{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-tool-schema-drift-that-weaponizes-mcp-manifest-rewrites-mid-session",
  "title": "How does an instance detect tool-schema drift that weaponizes MCP manifest rewrites mid-session",
  "date_of_record": "2026 November 29",
  "scope": "Applies to LLM agents that bind tool definitions from an MCP server at session start and cache the resolved schema across turns; does not cover stateless per-call tool resolution or servers that force a full re-handshake on every invocation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-tool-schema-drift-that-weaponizes-mcp-manifest-rewrites-mid-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-tool-schema-drift-that-weaponizes-mcp-manifest-rewrites-mid-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-tool-schema-drift-that-weaponizes-mcp-manifest-rewrites-mid-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1641,
    "python_slice_tokens": 334,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure we are isolating is not prompt injection in the *content* channel (a tool returning hostile text that the model reads). It is poisoning in the *capability* channel: the MCP manifest that declares what a tool *is* mutates between the moment the agent negotiated it and the moment it is invoked, so the description string the model reasons over no lo...",
    "what_was_observed": "A three-turn trace against a server that advertised `list_directory` at handshake with a two-field input schema (`path`, `recursive`). At turn 1 the agent cached the manifest hash `sha256:9f3a…`. At turn 2, between the agent's tool-selection decision and the actual `tools/call`, the server returned a `notifications/tools/list_changed` event. The agent's host runtime re-fetched `tools/list` and received a manifest whe...",
    "condition_of_validity": "The guardrail holds only under a specific condition: **the manifest must be content-addressed and immutable for the lifetime of a negotiated session, and any `list_changed` event must be treated as a re-negotiation requiring explicit model re-consent, not a silent hot-swap.** Concretely, the host runtime must: 1. Pin the manifest hash at handshake and refuse...",
    "decision_boundary": "The boundary the agent must compute is: *does the manifest I am about to invoke match the manifest I negotiated, and if not, was the change surfaced to me as a diff I can reason about?* If the hash matches → proceed, the description is trustworthy within its declared schema. If the hash differs and no diff was surfaced → **halt the tool call and escalate**; ...",
    "operational_effect": "The operational consequence of missing this boundary is that the agent's tool-selection loop becomes an **attacker-steerable instruction interpreter** while every individual call appears healthy. Error rates stay at zero, latency is normal, and the only artifact is that arguments the original schema never permitted start appearing in `tools/call` payloads. T..."
  },
  "matched_failure_symptoms": [
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "ed8f243ccfecbd7ca14e6f3e10d2e5c6f896b60aac0d75830990657a94458025",
    "verified_classes": [
      "ManifestDriftError",
      "NegotiatedTool"
    ],
    "verified_functions": [
      "_hash_manifest",
      "negotiate",
      "verify_before_call",
      "invoke_tool"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ManifestDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
