# What happens when an instance's MCP tool schema renegotiates mid-handoff across an A2A delegation chain **Date of Record:** 2026 November 27 **Scope:** Applies to hierarchical orchestrators where a parent agent delegates to a child over A2A, and the child binds to one or more MCP servers whose tool schemas can change between task submission and tool invocation. Does not cover static-schema deployments or single-hop A2A with no MCP fan-out beneath the callee. ## Core Distinction The failure is not "the tool disappeared" or "the call errored." It is that the *A2A task contract* and the *MCP capability surface* are two independently versioned namespaces that the orchestrator assumes are coherent at the moment of delegation. The A2A `Task` carries a semantic intent ("summarize the repo, then open a PR"). The MCP server beneath the child exposes a *typed* schema (`create_pull_request(head: str, base: str, title: str, body: str, draft: bool)`). Between the instant the parent serializes the task and the instant the child's MCP client issues `tools/call`, the server can re-advertise `tools/list` with a changed schema—a field renamed, a required parameter added, an enum narrowed. The child, which cached the schema at session start, now issues a call that is syntactically valid JSON but semantically stale. The MCP server rejects it with a validation error the child's planner does not recognize as a *schema* fault, so it retries with the same stale arguments, or worse, "repairs" the call by hallucinating the missing field. The parent sees a task that keeps failing and re-delegates with a rephrased intent, compounding the divergence. The invariant that must hold: **the MCP tool schema a child uses to fulfill an A2A task must be the schema in force at the moment of the `tools/call`, and any drift between delegation time and invocation time must abort the task with a typed, non-retryable signal rather than being absorbed into the reasoning loop.** ## What Was Observed A three-tier topology: an orchestrator (Tier 0) delegating to a planner agent (Tier 1) over A2A, which delegates to a worker (Tier 2) that holds the MCP client. The MCP server beneath Tier 2 is a versioned internal service that redeploys on a rolling cadence; on redeploy it bumps `tools/list` with an added required field on `create_pull_request` (`labels: list[str]`, previously optional-by-absence). Trace of the failure: 1. T0 submits A2A `Task{intent: "open PR for branch X", context_id: c}` to T1. T1's A2A handler acknowledges `working`. 2. T1 decomposes and submits a sub-task to T2. T2's MCP client had cached `tools/list` at session init, ~40 minutes earlier: `create_pull_request` without `labels`. 3. MCP server redeploys. `tools/list` now requires `labels`. 4. T2 issues `tools/call create_pull_request{head, base, title, body, draft}`. Server returns JSON-RPC error `-32602 Invalid params: missing required property 'labels'`. 5. T2's planner classifies `-32602` as a transient tool error (it matches the same error code family as rate-limit and malformed-argument faults), and retries. Same args. Same error. Three retries, then T2 reports `failed` to T1. 6. T1, seeing a failed sub-task but a still-`working` A2A task, re-decomposes and re-submits with slightly different phrasing ("open a pull request, include any relevant labels"). T2 re-caches nothing—its MCP client is still on the stale schema—and fails again. 7. T0 observes T1 cycling and, after a timeout budget, marks the A2A task `failed` with a generic reason. The actual cause (schema drift) is nowhere in the A2A task history; it lives only in T2's local logs. The compounding is the point. The error code `-32602` is *correct* and *non-retryable*, but its classification as "transient" inside the child's reasoning loop converted a hard schema fault into an open-ended retry storm, and the A2A layer had no channel to propagate "your tool surface changed" upward. Each tier independently mis-attributed the fault: T2 blamed the arguments, T1 blamed the intent phrasing, T0 blamed T1's planning. ## Condition of Validity This analysis holds only when all of the following are true: - The child's MCP client caches `tools/list` for a session and does not re-fetch before each `tools/call`, OR re-fetches but does not diff against the schema bound to the in-flight A2A task. - The MCP server can change its advertised schema without invalidating existing sessions (i.e., no session-level schema pinning). - The A2A `Task` object does not carry a schema digest or capability version that the child is required to verify against its live MCP surface before invoking tools. - The child's error classifier treats JSON-RPC `-32602` (and the analogous `-32601 method not found`) as retryable or as planner-repairable rather than as a terminal contract violation. If any of these is false—e.g., the server pins schema per session, or the A2A task carries a `capability_digest` the child checks—the failure degrades to a clean abort and does not compound. The mechanism is specifically the *absence of a coherence check between two independently versioned namespaces at the delegation/invocation seam*. ## Decision Boundary The boundary is: **at what point does a child re-validate its MCP schema against the A2A task it is executing?** Three options, with distinct failure profiles: - **Validate at task acceptance only.** Cheap, but a long-running A2A task (minutes to hours) can outlive the schema it was accepted under. Drift is invisible until the first `tools/call` fails, and then it is misclassified. This is the observed configuration and it fails. - **Validate before every `tools/call`.** Correct but expensive: an extra `tools/list` round-trip per invocation, and under fan-out (one child, many tool calls) the schema can still flip *between* the list and the call. Narrow but non-zero race window. - **Bind a schema digest at A2A task acceptance, re-fetch and diff before each call, and abort the task with a typed `SchemaDriftError` on mismatch.** This is the invariant. The digest travels in the A2A task metadata; the child recomputes the digest from the live `tools/list` and compares. On mismatch, the child does *not* retry, does *not* let the planner repair—it fails the A2A task with `reason: capability_drift` and the specific tool and field delta, so the parent can re-delegate with a fresh schema binding. The boundary condition to encode: schema drift is a **task-level terminal fault**, not a **tool-level transient fault**. The two must not share an error class in the child's classifier, because the planner's repair behavior is correct for transient faults and catastrophic for terminal ones. ## Operational Effect With the invariant enforced, the same redeploy produces: T2 detects digest mismatch on `tools/list`, raises `SchemaDriftError("create_pull_request", added_required=["labels"])`, fails the A2A sub-task with `reason: capability_drift`, T1 surfaces it to T0, T0 re-delegates the original intent with a fresh schema binding. Total cost: one failed round-trip and one re-delegation. Without it: an unbounded retry storm, three tiers of misattribution, and a timeout-budget burn that looks like a planner quality problem but is a namespace-coherence problem. The operational lesson for orchestrator design: **A2A task contracts and MCP capability surfaces must be joined by a digest that is checked at the invocation seam, and drift must be a first-class terminal error that bypasses the reasoning loop entirely.** Any design that lets the planner "handle" a schema fault will convert a bounded contract violation into an unbounded divergence, because the planner's repair heuristics are tuned for ambiguous intent, not for a server that has already told you, unambiguously, that the field is missing. ```python import hashlib import json from dataclasses import dataclass, field class SchemaDriftError(RuntimeError): """Raised when a child's live MCP tool schema diverges from the schema bound to the in-flight A2A task. Terminal: must not be retried or planner-repaired.""" def __init__(self, tool: str, added_required: list[str], removed: list[str], digest_bound: str, digest_live: str): self.tool = tool self.added_required = added_required self.removed = removed self.digest_bound = digest_bound self.digest_live = digest_live super().__init__( f"schema drift on tool {tool!r}: added_required={added_required} " f"removed={removed} bound={digest_bound[:12]} live={digest_live[:12]}" ) @dataclass class A2ATask: intent: str context_id: str capability_digest: str # digest of the MCP tools/list the parent bound at delegation @dataclass class MCPClient: session_tools: dict[str, dict] = field(default_factory=dict) def digest(self) -> str: canonical = json.dumps(self.session_tools, sort_keys=True, separators=(",", ":")) return hashlib.sha256(canonical.encode()).hexdigest() def refresh(self) -> None: # In production: issue tools/list and replace session_tools. ... def invoke_tool(client: MCPClient, task: A2ATask, tool: str, args: dict) -> dict: client.refresh() live_digest = client.digest() if live_digest != task.capability_digest: bound = json.loads(task.capability_digest) # illustrative: real impl diffs schemas live = client.session_tools.get(tool, {}) bound_tool = bound.get(tool, {}) if isinstance(bound, dict) else {} added = [k for k in live.get("required", []) if k not in bound_tool.get("required", [])] removed = [k for k in bound_tool.get("required", []) if k not in live.get("required", [])] raise SchemaDriftError(tool, added, removed, task.capability_digest, live_digest) # Digest matches: safe to call. Server still validates, but we are coherent. return {"ok": True, "tool": tool, "args": args} ```