What is an Argument Schema?
An argument schema defines the expected structure, types, and constraints of arguments for an MCP tool, used by Intercept to validate tool calls against policy rules and ensure arguments conform to expected formats.
WHY IT MATTERS
MCP tools accept arguments as JSON objects, but without a schema, there is no contract defining what those arguments should look like. An agent might pass a string where a number is expected, omit required fields, or include unexpected parameters. Argument schemas formalise this contract, creating a machine-readable definition of what valid arguments look like.
Schemas serve two purposes in the context of policy enforcement. First, they enable type-safe policy conditions — if the schema declares amount as a number, a condition like amount < 1000 can be evaluated with confidence. Second, they catch malformed tool calls before they reach the server, preventing errors that could leave systems in inconsistent states.
Well-designed MCP servers declare schemas for their tools using JSON Schema, which MCP clients can use for validation and UI generation. Intercept leverages these schemas when available, and supports schema definition in policy files for servers that do not declare them. This ensures consistent validation regardless of server implementation quality.
HOW POLICYLAYER USES THIS
Intercept reads argument schemas from MCP server tool declarations (via the tools/list method) and uses them to validate tool call arguments and type-check policy conditions. When a server does not declare schemas, you can define expected argument structures directly in your policy files. Intercept uses schemas to provide helpful error messages when validation fails — telling the agent exactly which argument violated which constraint.