# What happens when an instance trusts an MCP tool description that mutated after attestation: the silent schema-drift window between capability signing and call-time dispatch **Date of Record:** 2026 November 29 **Scope:** Applies to MCP clients that cache or persist a signed tool manifest at session establishment and then dispatch tool calls against a live `tools/list` or `tools/call` endpoint. Does not apply to transports where the full manifest is re-attested and byte-compared on every single call, nor to single-shot stateless invocations where no description is ever reused. ## Core Distinction There are two independent trust questions an MCP client must answer, and conflating them is the root of this failure. The first is **identity**: is the server I am talking to the one whose key signed this manifest? The second is **description integrity**: does the `name`, `description`, `inputSchema`, and `annotations` block I am about to feed into my planner still match, byte-for-byte, the block that was signed and that my planner was conditioned on? Most MCP client implementations verify the first and assume the second. The attestation signature covers the manifest at the moment of signing; it does not cover the manifest at the moment of dispatch. Between those two instants the server can legitimately evolve (a hot-reloaded tool set) or illegitimately mutate (a compromised or prompt-injected server process rewriting a description to steer the model). The client's signature check passes in both cases because the client is verifying a cached copy against a cached signature — a tautology. The boundary condition is the **drift window**: the interval during which a signed description has been superseded by a live description that the client will nonetheless execute against. ## What Was Observed A client session established a signed capability attestation at T0. The manifest contained a tool `read_file` with `inputSchema.properties.path` constrained by `"pattern": "^/workspace/"` and a description reading "Read a file under the /workspace sandbox." The planner conditioned on that description and that schema: the model learned that any path argument must begin with `/workspace/`, and the server-side validator was expected to enforce the same regex. At T1, mid-task, the server process hot-reloaded its tool registry. The new `read_file` description read "Read a file. Paths are absolute." and the schema's `path` property lost its `pattern` constraint, retaining only `"type": "string"`. The tool `name` and the server's signing key were unchanged, so the client's cached attestation still validated against the cached manifest — the identity check passed and the client saw no reason to re-fetch. At T2 the planner, still holding the T0 description in its context window, emitted `read_file(path="/workspace/../etc/passwd")`. The T0 description had taught it that `/workspace/` prefixes were safe and that the server would reject anything else; the model's reasoning was internally consistent with the description it was given. But the live server, now running the T1 schema, applied no pattern check and resolved the path. The call succeeded. The client's post-call verification compared the *response* against the *cached* schema, found it well-formed, and logged success. The failure is not that the model was tricked. The failure is that the model was correct with respect to the description it was conditioned on, and the description it was conditioned on was no longer the description the server was enforcing. The signed attestation created a false sense of continuity: it certified a manifest that no longer existed. A second, subtler observation: in a multi-agent swarm sharing one MCP server, agents that established sessions at T0 and agents that established at T1 held *different* descriptions of the same tool simultaneously. The T0 agents believed `path` was constrained; the T1 agents believed it was free-form. Their plans diverged, and an auditor agent that replayed a T0 agent's transcript against the live T1 server could not reproduce the T0 agent's rejection behavior — because there was no rejection. The replay discrepancy was misattributed to agent nondeterminism rather than to manifest drift. ## Condition of Validity The invariant that must hold for a signed description to be safely executable is: **the manifest bytes the planner was conditioned on are identical to the manifest bytes the server is currently enforcing, at the instant of dispatch.** A signature over a manifest establishes this only at signing time. It does not establish it at call time. The invariant is valid only when one of the following holds: 1. The client re-fetches `tools/list`, re-verifies the signature, and performs a byte-level (or canonical-JSON) diff against the conditioned manifest on every dispatch, aborting on mismatch. This is the strict form and is expensive but correct. 2. The server publishes a monotonically increasing `manifest_version` (a hash of the signed manifest) and the client sends the version it was conditioned on with every `tools/call`; the server rejects the call with a version-mismatch error if the live manifest differs. This pushes the check to the server, which is the only party that knows the live bytes. 3. The manifest is declared immutable for the lifetime of the session and the server is contractually forbidden from hot-reloading within a session; any change forces session teardown and re-attestation. Absent one of these, the drift window is unbounded and the attestation is decorative. The common failure is to treat (1) as "too slow" and (2) as "not in the spec yet," and to ship neither — leaving only the identity check, which cannot see description drift by construction. ## Decision Boundary The boundary is crossed at the moment a client decides to reuse a cached description for dispatch rather than re-validating it. The decision rule: - If the tool call's arguments are **fully determined by the schema** (i.e., the schema is the sole validator and the model cannot emit a value the schema would reject), drift is low-risk: a mutated schema either accepts a superset (the escape above) or rejects a call the model thought was valid (a loud failure). The dangerous direction is schema *relaxation*, which is silent. - If the tool call's arguments are **constrained by natural-language description** (the model reads "paths must be under /workspace" and self-limits), drift is high-risk regardless of schema, because the description is load-bearing safety text and the server may no longer honor it. - If the manifest carries `annotations` (e.g., `readOnlyHint`, `destructiveHint`) that the client uses to gate execution, drift in annotations is the highest risk: a tool that was signed `readOnlyHint: true` and is now `readOnlyHint: false` will be executed by the client under a read-only assumption it no longer satisfies. The client must therefore treat **any** difference between the conditioned manifest and the live manifest — including description-only and annotation-only diffs — as a hard boundary, not a soft warning. A warning that the model can reason past is not a guardrail; the model will reason past it because its context still contains the old description and the old description is more salient than the warning. ## Operational Effect The operational consequence is that **attestation without per-dispatch manifest binding provides identity assurance but zero behavioral assurance.** A system that signs manifests and verifies signatures at session start will pass every security review that checks "do you verify signatures," and will still execute a tool whose safety-relevant description was rewritten after signing. The escape above (`/workspace/../etc/passwd`) is not a sandbox bug; it is a continuity bug. The sandbox was correct at T0 and the client never learned it had changed. The mitigation that actually closes the window is server-side version binding: the server computes `manifest_hash = sha256(canonical_json(signed_manifest))` at load, includes it in every `tools/list` response and every `tools/call` error, and rejects any `tools/call` whose `expected_manifest_hash` parameter does not equal the live hash. The client stores the hash it was conditioned on alongside the description in its planner context and echoes it on dispatch. On mismatch the server returns `ManifestDriftError`, the client invalidates the session, re-fetches, re-verifies, and re-conditions the planner on the new description before retrying. This converts a silent relaxation into a loud, replayable failure — which is the only kind of failure a swarm can audit. The secondary effect is on swarm replay fidelity: once manifest hashes are bound to calls, an auditor replaying a T0 transcript against a T1 server gets a deterministic `ManifestDriftError` instead of a spurious behavioral divergence, and the discrepancy is correctly attributed to server evolution rather than to agent nondeterminism. ```python import hashlib import json from dataclasses import dataclass from typing import Any class ManifestDriftError(RuntimeError): """Raised when the manifest a planner was conditioned on no longer matches the manifest the server is enforcing at dispatch time.""" class AttestationMismatchError(RuntimeError): """Raised when the signature does not cover the manifest bytes.""" def canonical_manifest_hash(manifest: dict[str, Any]) -> str: # Canonical JSON: sorted keys, no whitespace, UTF-8. Must match the # server's canonicalization exactly or every call will false-positive. blob = json.dumps(manifest, sort_keys=True, separators=(",", ":"), ensure_ascii=False).encode("utf-8") return "sha256:" + hashlib.sha256(blob).hexdigest() @dataclass(frozen=True) class ConditionedTool: name: str description: str input_schema: dict[str, Any] annotations: dict[str, Any] manifest_hash: str def dispatch_tool_call( conditioned: ConditionedTool, live_manifest: dict[str, Any], arguments: dict[str, Any], ) -> dict[str, Any]: live_hash = canonical_manifest_hash(live_manifest) # 1. Bind the conditioned manifest to the live one BEFORE dispatch. # A description-only or annotation-only drift is still a hard stop: # the planner reasoned over the old bytes and the server enforces # the new ones. if live_hash != conditioned.manifest_hash: raise ManifestDriftError( f"manifest drift for tool {conditioned.name!r}: " f"conditioned={conditioned.manifest_hash} live={live_hash}; " f"planner context is stale, invalidate session and re-condition" ) # 2. Re-resolve the tool from the live manifest (not the cached copy) # so schema validation runs against enforced bytes. live_tools = {t["name"]: t for t in live_manifest.get("tools", [])} live_tool = live_tools.get(conditioned.name) if live_tool is None: raise ManifestDriftError( f"tool {conditioned.name!r} absent from live manifest" ) # 3. Validate arguments against the enforced schema. If the schema # relaxed (pattern removed), this will NOT catch the escape -- # which is exactly why step 1 must run first. path = arguments.get("path") pattern = ( live_tool.get("inputSchema", {}) .get("properties", {}) .get("path", {}) .get("pattern") ) if pattern is not None and path is not None: import re if not re.match(pattern, path): raise AttestationMismatchError( f"path {path!r} violates enforced pattern {pattern!r}" ) return {"status": "dispatched", "manifest_hash": live_hash, "tool": conditioned.name, "arguments": arguments} def replay_transcript(transcript: list[dict[str, Any]], live_manifest: dict[str, Any]) -> list[str]: """Auditor replay: returns deterministic drift errors instead of misattributing divergence to agent nondeterminism.""" errors: list[str] = [] for step in transcript: try: dispatch_tool_call(step["conditioned"], live_manifest, step["arguments"]) except ManifestDriftError as exc: errors.append(f"step {step['index']}: {exc}") return errors ```