# What structural signals indicate capability-warrant desynchronization when an MCP gateway translates A2A task delegation into legacy tool-call frames **Date of Record:** 2026 November 23 **Scope:** Applies to stateless protocol-translation gateways that accept A2A (agent-to-agent) task envelopes, resolve them against an MCP server's advertised tool schema, and emit legacy OpenAI-style `tool_calls`/`function_call` frames to a downstream executor. Does not apply to gateways that hold a persistent per-delegation session object, nor to pure MCP-to-MCP proxying where capability metadata is passed through verbatim. ## Core Distinction The failure is not a schema mismatch. Schema mismatches are loud: the downstream executor rejects an unknown parameter and the gateway returns a structured error. The failure that matters is **capability-warrant desynchronization** — the gateway translates an A2A task into a legacy tool-call frame that is *syntactically valid and executable*, but whose implied authority exceeds or diverges from the authority the A2A delegator actually granted. Three protocol layers carry authority in incompatible shapes: - **A2A** expresses delegated authority as a task envelope with an explicit `capabilities` grant list, a `deadline`, and a `delegation_chain` (who authorized whom). Authority is *declared and bounded*. - **MCP** expresses authority as a tool's `inputSchema` plus server-side scoping (which resources the session can touch). Authority is *enforced at the server*. - **Legacy tool-call frames** express authority as nothing at all. A `tool_calls` array names a function and supplies arguments. There is no grant field, no deadline, no chain. Authority is *implicit and ambient* — whatever the executor process can reach. The gateway sits at the seam where a bounded, declared grant must be flattened into an unbounded, ambient call. The invariant that must hold is: **the authority reachable by the emitted legacy frame must be a subset of the intersection of the A2A grant and the MCP server scope.** Most gateways check the MCP scope (it's in the schema) and silently drop the A2A grant, because legacy frames have no slot to put it in. ## What Was Observed A gateway received an A2A task from an orchestrator agent delegating a "summarize repository" subtask. The envelope carried a `capabilities` grant of `["fs.read:/repo/docs/**"]` and a `deadline` of 90 seconds. The gateway resolved the task to an MCP tool `read_file` whose `inputSchema` accepted an unconstrained `path: string`, and emitted a legacy frame: ``` {"tool_calls": [{"function": {"name": "read_file", "arguments": "{\"path\": \"/repo/src/secrets.env\"}"}}]} ``` The call succeeded. The MCP server's scope check passed because the server had been provisioned with read access to all of `/repo`. The A2A grant — which restricted this specific delegation to `/repo/docs/**` — was never consulted, because the legacy frame had no field for it and the gateway's translation function only mapped `task.parameters` to `arguments`. The structural signals that this had occurred were **not** in the error channel. They were: 1. **Grant-collapse ratio.** The gateway logged the A2A envelope and the emitted frame separately. Comparing them, the number of authority-bearing fields dropped from 3 (`capabilities`, `deadline`, `delegation_chain`) to 0. A ratio of emitted-authority-fields to received-authority-fields of 0/3 is the primary signal. 2. **Path-scope widening.** The emitted `arguments.path` fell outside every glob in the received `capabilities` list. This is checkable at translation time by intersecting the concrete arguments against the grant globs — a pure string/set operation that requires no model. 3. **Deadline evaporation.** The legacy frame carried no timeout, so the executor's default (unbounded) applied. The 90-second grant became an unbounded execution window. 4. **Chain truncation.** The `delegation_chain` (orchestrator → gateway → executor) collapsed to a single hop at the executor, so any downstream audit attributed the read to the gateway identity, not the originating orchestrator. The second and third signals are the ones operators miss, because the *call succeeded*. There was no exception, no 4xx, no schema rejection. The task completed. The violation was only visible by diffing the authority surface of the input envelope against the authority surface of the output frame. ## Condition of Validity The invariant "emitted authority ⊆ received grant ∩ MCP scope" is only decidable, and only enforceable, under these conditions: - **The A2A grant is expressed in a machine-checkable form** (globs, resource IDs, enumerated verbs) rather than natural-language prose. If the delegator writes "read the docs folder," the gateway cannot intersect it with a concrete `path` argument, and the invariant is unverifiable — the gateway must then *refuse to translate* rather than guess. - **The MCP `inputSchema` constrains the argument domain.** An `inputSchema` of `path: string` with no `pattern`/`enum` gives the gateway nothing to intersect against. The gateway must treat an unconstrained schema as "scope unknown" and apply the A2A grant as the sole bound, or fail closed. - **The translation is total.** Every authority-bearing field in the A2A envelope must map to either a legacy frame field, a gateway-enforced wrapper (e.g., an injected timeout, an out-of-band grant token the executor checks), or an explicit refusal. Fields that map to nothing are the leak. - **The executor honors injected bounds.** If the gateway injects a deadline into the frame but the legacy executor ignores unknown fields, the deadline evaporates silently. This is a *transport* condition, not a translation condition: the gateway's guarantee is only as good as the executor's willingness to read the field it was given. Where any of these fails, the correct gateway behavior is to reject the translation with a structured error naming the unmappable authority field — not to emit a best-effort frame. ## Decision Boundary The gateway must decide, per task, between three outcomes. The boundary between them is set by whether the authority surface survives translation intact: - **Translate** when every A2A grant field has a concrete legacy representation *and* the emitted arguments are provably within the grant (arguments ∩ grant = arguments). Emit, and attach a translation receipt recording the grant that was checked. - **Wrap** when a grant field has no native legacy slot but can be enforced by the gateway itself — e.g., a deadline enforced by the gateway killing the executor call at T+90s, or a `delegation_chain` re-attached as an out-of-band audit header. The authority is preserved by the wrapper, not by the frame. This is the correct path for deadlines and chains, which legacy frames structurally cannot carry. - **Refuse** when a grant field constrains the *argument domain* and the gateway cannot verify the emitted arguments against it — unconstrained `inputSchema`, prose grants, or a grant glob the gateway's matcher cannot evaluate. Refusal must be a typed error, not a silent pass-through. The non-obvious boundary: **a task that translates cleanly at the schema level but drops a grant field must be refused, not translated.** Schema validity is necessary and insufficient. The gateway that checks only "does the frame parse" will pass every desynchronized call. ## Operational Effect Downstream of this failure, three things degrade in ways that are hard to attribute: 1. **Audit attribution collapses to the gateway.** Because the `delegation_chain` is dropped, every action taken by a delegated executor is logged against the gateway's identity. When an over-broad read occurs, the post-hoc investigation blames the gateway, not the orchestrator that issued the grant — and the orchestrator's grant logic is never reviewed. 2. **Deadline-bounded work becomes unbounded.** Tasks granted 90 seconds run until the executor's default timeout. Under load, a single unbounded delegated task holds an executor slot that the orchestrator believed was time-boxed, and the orchestrator's capacity accounting (which assumed the deadline) overcommits. 3. **Grant drift compounds across hops.** In a multi-hop chain (orchestrator → sub-orchestrator → gateway → executor), each gateway that drops the grant widens the effective authority by one hop. Two hops of grant-collapse can turn a `/repo/docs/**` delegation into a full-filesystem read, with each individual gateway reporting "translation succeeded." The guardrail is structural, not statistical: the gateway must compute the authority-surface diff between received envelope and emitted frame on every translation, and refuse when the diff is non-empty and unwrapped. This is a deterministic set operation over declared fields — it does not require a model, a judge, or a confidence threshold. It requires only that the gateway treat "no legacy slot for this grant field" as a refusal condition rather than a no-op. The code below implements the translation gate with the three-outcome decision and a typed refusal. ```python from dataclasses import dataclass, field from fnmatch import fnmatch from typing import Any class AuthorityDesyncError(RuntimeError): """Raised when an A2A grant cannot be preserved in a legacy tool-call frame.""" @dataclass class A2AGrant: capabilities: list[str] # e.g. ["fs.read:/repo/docs/**"] deadline_seconds: float | None delegation_chain: list[str] @dataclass class LegacyFrame: name: str arguments: dict[str, Any] injected: dict[str, Any] = field(default_factory=dict) # gateway-enforced bounds def _glob_within(arg_path: str, grant_globs: list[str]) -> bool: return any(fnmatch(arg_path, g) for g in grant_globs) def translate( grant: A2AGrant, mcp_tool: str, mcp_schema_constrained: bool, arguments: dict[str, Any], gateway_can_enforce_deadline: bool, ) -> LegacyFrame: # 1. Argument-domain check: every fs path argument must sit inside a grant glob. for key, val in arguments.items(): if key == "path" and isinstance(val, str): read_grants = [c.split(":", 1)[1] for c in grant.capabilities if c.startswith("fs.read:")] if not read_grants: raise AuthorityDesyncError( f"argument '{key}' present but grant carries no fs.read capability") if not _glob_within(val, read_grants): raise AuthorityDesyncError( f"argument '{key}'={val!r} escapes grant globs {read_grants}") # 2. Unconstrained schema + prose/unverifiable grant => cannot verify, refuse. if not mcp_schema_constrained and not grant.capabilities: raise AuthorityDesyncError( "unconstrained MCP schema with empty grant: authority unverifiable") # 3. Deadline has no legacy slot; must be wrapped or refused. injected: dict[str, Any] = {} if grant.deadline_seconds is not None: if not gateway_can_enforce_deadline: raise AuthorityDesyncError( "grant carries deadline but gateway cannot wrap it; " "emitting frame would evaporate the bound") injected["_gateway_deadline_s"] = grant.deadline_seconds # 4. Delegation chain has no legacy slot; re-attach out-of-band or refuse. if grant.delegation_chain: injected["_delegation_chain"] = list(grant.delegation_chain) # 5. Authority-surface diff must be empty after wrapping. unwrapped = [ f for f in ("capabilities", "deadline_seconds", "delegation_chain") if getattr(grant, f) and f not in ("capabilities",) # capabilities checked above and not any(k.endswith(f) or f in k for k in injected) ] if unwrapped: raise AuthorityDesyncError( f"unwrapped authority fields {unwrapped}: refusing translation") return LegacyFrame(name=mcp_tool, arguments=arguments, injected=injected) ```