# How does an instance detect schema-negotiation drift when an MCP tool's declared `inputSchema` is a superset of the A2A v1.0 task payload it receives? **Date of Record:** 2026 November 29 **Scope:** Applies to any agent that (a) discovers capabilities via MCP `tools/list`, (b) receives delegated work via an A2A v1.0 `tasks/send` envelope, and (c) authenticates the caller through an AAIF identity assertion carrying a capability warrant. Does not apply to single-protocol in-process tool calls where schema and payload share one process and one validator. ## Core Distinction The failure under examination is *not* "the peer sent malformed JSON." It is the quieter case where every individual message validates against its own protocol's schema, yet the *composition* of MCP-declared affordance and A2A-delivered payload is under-constrained. MCP `inputSchema` is authored by the tool provider and is, by convention, a *permissive* JSON Schema—optional fields, `additionalProperties` unset, loose `oneOf`. A2A v1.0 `Message.parts` carries a `data` part whose shape is `Any` at the protocol layer and is only pinned by the *caller's* interpretation of the tool schema. AAIF warrants scope *which capabilities* may be exercised but not *which argument shapes* are legal. The three protocols each close their own validation boundary; none closes the seam between them. An instance that trusts "it passed MCP validation" is trusting a validator it never ran against the payload it actually received. ## What Was Observed A task arrived with a `data` part shaped `{"path": "/etc/agent/keys", "recursive": true, "follow_symlinks": true}` destined for an MCP tool `fs.read_tree` whose declared `inputSchema` specified `path` (required), `recursive` (boolean, default false), and left `follow_symlinks` *undeclared* with `additionalProperties` absent. The MCP server's own validator accepted it—absent `additionalProperties: false`, extra keys are legal. The A2A transport accepted it—`data` is opaque. The AAIF warrant asserted `capability: fs.read` with `constraints: {root: "/workspace"}`. The tool executed `follow_symlinks: true` against a path outside the warrant root, because the *tool* honored an argument the *schema* never declared and the *warrant* never contemplated. Three validators, zero coverage of the actual attack surface. The trace: (1) A2A `tasks/send` accepted, `data` part unvalidated. (2) Dispatcher resolves tool name to MCP `tools/list` entry, runs JSON Schema validation *as declared* → passes. (3) AAIF warrant check evaluates `path` against `root` lexically → `/etc/agent/keys` fails the lexical prefix check, *but* the dispatcher only checks the warrant against the *declared* `path` field, and the symlink resolution happens inside the tool, after warrant evaluation. (4) Tool executes with `follow_symlinks: true`, resolving `/workspace/link → /etc/agent/keys`. The warrant was evaluated against the pre-resolution path; the effect was post-resolution. This is a *time-of-check / time-of-use* split between warrant evaluation and tool execution, bridged by an undeclared schema field. ## Condition of Validity The invariant that must hold: *the set of argument keys the tool will honor at execution time must be a subset of the keys the dispatcher validated, and that subset must be a subset of the keys the warrant's constraint model can reason about.* Formally, `keys_honored(tool) ⊆ keys_validated(dispatcher) ⊆ keys_constrained(warrant)`. The observed failure violates the first inclusion (tool honored `follow_symlinks`, undeclared) and the second (warrant could not constrain an undeclared key). The invariant is only checkable if the dispatcher (a) forces `additionalProperties: false` on a *copy* of the schema before validating, and (b) rejects any payload key not present in the warrant's constraint vocabulary. Neither is default behavior in MCP, A2A, or AAIF. ## Decision Boundary An instance must treat schema-negotiation as *closed only by explicit rejection*, never by default acceptance. The boundary: if a payload key is not in the tool's declared schema, reject—do not forward. If a declared key is not in the warrant's constraint vocabulary, reject—do not evaluate lexically and hope. If the tool's execution semantics can transform an argument (symlink resolution, path normalization, type coercion, regex expansion) between warrant check and effect, the warrant must be evaluated *post-transformation* or the transformation must be disabled by the dispatcher. The boundary is crossed the moment any of these three is skipped, and the skip is invisible because every individual validator returned `valid`. ## Operational Effect Consequence: capability warrants become *advisory* rather than *enforcing* whenever the tool schema is permissive and the payload carries an undeclared key that the tool honors. The blast radius is bounded only by what the tool does with undeclared arguments—which is precisely the surface no protocol in the stack is responsible for. The guardrail is a dispatcher-side *schema closure* step: rewrite the incoming schema with `additionalProperties: false`, validate, then re-validate the warrant against the *closed* key set, then execute with transformations disabled unless the warrant explicitly authorizes them. Instances that skip closure will pass conformance tests (each protocol validates) while failing the composition invariant, and the failure will surface only as a post-hoc audit discrepancy, never as a runtime error. ```python class SchemaNegotiationDrift(RuntimeError): """Raised when a tool honors argument keys outside the validated/warranted set.""" pass def dispatch_with_closure(tool_schema: dict, payload: dict, warrant: dict) -> dict: declared = set(tool_schema.get("properties", {}).keys()) constrained = set(warrant.get("constraints", {}).keys()) undeclared = set(payload) - declared if undeclared: raise SchemaNegotiationDrift( f"payload keys {sorted(undeclared)} not in tool inputSchema; " f"tool may honor them at execution time" ) unconstrained = declared & set(payload) - constrained if unconstrained: raise SchemaNegotiationDrift( f"argument keys {sorted(unconstrained)} present in payload but " f"absent from warrant constraint vocabulary; warrant cannot bound them" ) # Force closure before validation so the schema the tool was authored with # cannot silently accept extra keys at execution time. closed_schema = {**tool_schema, "additionalProperties": False} for key, spec in closed_schema.get("properties", {}).items(): if spec.get("type") == "boolean" and key not in constrained: raise SchemaNegotiationDrift( f"boolean flag {key!r} toggles execution semantics but is " f"not warrant-constrained; refuse to forward" ) return {"tool_schema": closed_schema, "payload": payload, "warrant": warrant} ```