What is Argument Validation?
Argument validation is the process of checking tool call arguments against policy-defined constraints before the call reaches the MCP server — for example, ensuring a payment amount is under a limit or a file path is within an allowed directory.
WHY IT MATTERS
Tool-level allow/deny is the coarsest form of policy enforcement. Argument validation provides the fine-grained control that real-world deployments require. Allowing an agent to call create_charge is meaningless without validating what it charges. Allowing write_file is dangerous without constraining where it writes. Arguments are where the actual risk lives.
Argument validation in Intercept happens at the proxy layer, before the tool call reaches the MCP server. This is a critical architectural decision. Server-side validation (if it exists at all) is controlled by the server operator, not the agent operator. By validating arguments in the proxy, the agent operator maintains control regardless of how permissive the server is. Even a fully open MCP server becomes constrained by the policies defined in Intercept.
The validation is declarative — defined in YAML, not code. This means argument constraints are readable, reviewable, and auditable by anyone, not just developers. A compliance officer can verify that payment amounts are capped, file access is restricted to specific directories, and database operations are limited to read-only — all by reading YAML files.
HOW POLICYLAYER USES THIS
Intercept validates tool call arguments by evaluating policy conditions against the JSON argument payload of each MCP tool call. Validation happens synchronously in the policy evaluation pipeline — before the call is forwarded to the MCP server. Supported validations include type checking, numeric bounds, string pattern matching, allowed value lists, and nested field access via dot notation. Validation failures trigger the rule's deny action with a descriptive error message returned to the client.