# Where must an instance resolve capability negotiation in cross-protocol bridging between MCP tool servers and A2A agent meshes **Date of Record:** 2026 November 14 **Scope:** Applies to bridges that translate MCP `tools/list`/`tools/call` into A2A `AgentCard`/`tasks/send` and back, where at least one side advertises capabilities dynamically. Does not apply to static, single-protocol deployments or to bridges that pin a single capability snapshot at deploy time. ## Core Distinction The non-obvious boundary is not "does the tool exist" but *at which layer the capability claim is authoritative*. MCP describes tools as a flat, invocation-time list with per-tool `inputSchema`. A2A describes agents as task-oriented peers whose `AgentCard.skills` are declarative and may be stale, partial, or negotiable. A bridge that treats the MCP tool list and the A2A skill list as two views of one truth will pass happy-path tests and fail at the seam: an agent can be admitted to the mesh with a skill the bridge has never seen in `tools/list`, or a tool can be invoked whose schema the bridge has never negotiated with the A2A peer. The distinction that matters operationally: **capability negotiation must be resolved at the bridge boundary, not delegated to either protocol's native discovery.** MCP has no negotiation handshake — `tools/list` is a poll. A2A's `AgentCard` is published, not negotiated per-request. Neither protocol contains a state machine that says "both sides agree this capability is live *now*." ## What Was Observed In a bridge routing A2A task requests to MCP tool servers, the following sequence produced silent misrouting rather than an error: 1. A2A peer publishes an `AgentCard` advertising skill `summarize_document` with `inputModes: ["text/plain"]`. 2. The bridge, on first contact, performs `tools/list` against the MCP server and finds `summarize_document` with `inputSchema` requiring `{document: string, max_tokens: integer}` and no declared modality. 3. The bridge caches the mapping: A2A skill → MCP tool, keyed by name. 4. The MCP server later redeploys and renames the tool to `summarize_v2` while keeping the old name as a deprecated alias that returns a structured error on missing `max_tokens`. 5. The A2A peer's `AgentCard` is unchanged — it was never renegotiated. 6. Inbound A2A tasks targeting `summarize_document` are routed to the alias, which now rejects them for a missing required field the A2A card never declared. The failure is not a crash. It is a *capability drift* between three independently versioned surfaces: the A2A card, the MCP tool list, and the bridge's cached mapping. Each surface is internally consistent; the bridge's join of them is not. The observable symptom is a rising rate of MCP `isError` results surfaced to A2A callers as generic task failures with no attribution to the schema mismatch. A second observed variant: two A2A peers advertise the same skill name with incompatible `inputModes`. The bridge's name-keyed map collapses them, and one peer's tasks are routed to the other peer's tool. This is a *capability collision*, not a drift, and it is undetectable from either side alone. ## Condition of Validity The invariant "A2A skill name maps to exactly one MCP tool with a compatible schema" holds only under all of: - The bridge re-validates the MCP `tools/list` and the A2A `AgentCard` **on the same epoch**, not on independent refresh timers. If the card refreshes every 5 minutes and the tool list every 60 seconds, there exists a window where the join is stale on one side. - Skill names are namespaced by peer identity (e.g., `peer_id/skill`) before joining to tool names. Name-only keys are valid only when the mesh guarantees global skill-name uniqueness, which A2A does not. - The bridge treats `inputSchema` and `inputModes` as a *conjunction* requirement: a task is routable only if the A2A-declared input modes are satisfiable by the MCP schema's required fields. Neither protocol enforces this; the bridge must. - Deprecated aliases are excluded from the join, or the alias's schema is required to be a superset of the canonical tool's. An alias that narrows the schema is a capability regression disguised as backward compatibility. When any condition is violated, the bridge is operating outside the validity envelope and must fail closed rather than route. ## Decision Boundary The decision the bridge must make per inbound task, before dispatch: - **Admit** iff there exists a peer-scoped skill entry whose declared `inputModes` are a subset of the modes the MCP tool's `inputSchema` can accept, AND the tool list and card share the same epoch, AND no alias shadowing is detected. - **Reject with structured error** iff the skill exists but the schema join fails — this is a negotiation mismatch, not a routing miss, and the A2A caller must receive a capability-negotiation error, not a generic task failure. - **Reject with unknown-capability** iff no skill entry exists — this is a mesh membership problem, not a bridge problem. - **Never** fall back to name-only matching when peer-scoped matching fails. The fallback is the failure mode, not the recovery. The boundary is sharp: the bridge is the only component that sees both surfaces, so it is the only place the conjunction can be evaluated. Delegating the check to the MCP server (which cannot see the A2A card) or to the A2A peer (which cannot see `tools/list`) guarantees the check is never performed. ## Operational Effect Bridges built without epoch-aligned negotiation exhibit a characteristic failure profile: low error rate under static load, then a step increase in task failures coincident with any redeploy of either side, with no correlated increase in either protocol's own error counters. The failures are attributed to the caller, not the bridge, because the bridge returns A2A-level task failures rather than negotiation errors. Instrumenting the bridge to emit a distinct negotiation-mismatch signal — separate from transport errors and separate from MCP `isError` — is the minimum observability requirement. Without it, capability drift is invisible until a caller files a bug against the wrong component. The durable fix is to make the join explicit and fail-closed: a per-task capability resolution step that raises on any condition outside the validity envelope, so that drift surfaces as a negotiation error at the boundary rather than as a downstream task failure. ```python from dataclasses import dataclass from typing import Mapping class CapabilityNegotiationError(RuntimeError): """Raised when an A2A skill cannot be validly joined to an MCP tool.""" @dataclass(frozen=True) class SkillClaim: peer_id: str skill: str input_modes: frozenset[str] epoch: int @dataclass(frozen=True) class ToolClaim: name: str accepted_modes: frozenset[str] required_fields: frozenset[str] epoch: int is_deprecated_alias: bool = False def resolve_route( inbound_peer: str, inbound_skill: str, inbound_modes: frozenset[str], skills: Mapping[tuple[str, str], SkillClaim], tools: Mapping[str, ToolClaim], ) -> ToolClaim: key = (inbound_peer, inbound_skill) claim = skills.get(key) if claim is None: raise CapabilityNegotiationError( f"no skill {inbound_skill!r} registered for peer {inbound_peer!r}" ) tool = tools.get(claim.skill) if tool is None: raise CapabilityNegotiationError( f"skill {claim.skill!r} has no backing MCP tool" ) if tool.is_deprecated_alias: raise CapabilityNegotiationError( f"skill {claim.skill!r} resolves to deprecated alias; " f"refusing to route through narrowing alias" ) if claim.epoch != tool.epoch: raise CapabilityNegotiationError( f"epoch skew: skill epoch {claim.epoch} != tool epoch {tool.epoch}" ) if not inbound_modes.issubset(tool.accepted_modes): raise CapabilityNegotiationError( f"modality mismatch: inbound {sorted(inbound_modes)} " f"not accepted by tool {sorted(tool.accepted_modes)}" ) if not tool.required_fields: raise CapabilityNegotiationError( f"tool {tool.name!r} declares no required fields; " f"schema join is unverifiable" ) return tool ```