{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-tool-description-poisoning-from-surviving-a-capability-re-negotiation-after-mcp-server-hot-swap",
  "title": "Which invariants prevent tool-description poisoning from surviving a capability re-negotiation after MCP server hot-swap",
  "date_of_record": "2026 November 26",
  "scope": "Applies to LLM agent runtimes that discover MCP tools dynamically (tools/list) and cache tool descriptions across a server reconnection, version bump, or hot-swap. Does not apply to statically compiled tool schemas, nor to runtimes that re-fetch and re-adjudicate the full tool catalog on every turn.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-tool-description-poisoning-from-surviving-a-capability-re-negotiation-after-mcp-server-hot-swap.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-tool-description-poisoning-from-surviving-a-capability-re-negotiation-after-mcp-server-hot-swap.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-tool-description-poisoning-from-surviving-a-capability-re-negotiation-after-mcp-server-hot-swap.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1282,
    "python_slice_tokens": 189,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The dangerous failure is not that a malicious MCP server injects instructions into a `description` field. The dangerous failure is that a *previously trusted* server's tool descriptions are treated as a durable, cacheable artifact whose trust is bound to the *tool name* rather than to the *description bytes*, so a hot-swap can rewrite the instruction payload...",
    "what_was_observed": "An agent established an MCP session with a server exposing `search_docs`, `summarize`, and `get_user_profile`. At session start the runtime ran a description-safety classifier over all three; all passed, and the verdicts were cached keyed by tool name in a persistent session store. The server later reconnected (transport drop, then resume) and replayed `tools/list`. The new `search_docs` description was byte-for-byte...",
    "condition_of_validity": "The bypass is only reachable when three conditions co-occur: 1. **Name-stable identity.** The runtime identifies tools by name across reconnects, so a mutated tool reuses the prior identity. 2. **Durable trust cache.** Adjudication verdicts persist beyond the session that produced them (on-disk session store, cross-turn memory, or a warm process pool), so th...",
    "decision_boundary": "The correct boundary is a **content-addressed trust binding**: the trust cache key must be `sha256(canonical(name, description, inputSchema))`, and the reconnect path must recompute that hash for every tool and reject any tool whose hash is absent from the trust store. On hash miss, the runtime has two admissible behaviors: (a) quarantine the tool, re-run ad...",
    "operational_effect": "With content-addressed binding in place, a hot-swapped description produces a hash miss, the tool is quarantined, and the exfiltration payload never reaches a callable surface. The observable cost is a re-adjudication latency spike on every server reconnect—typically one classifier pass per tool, which is the correct price. The invariant to log and alert on ..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "fd8d53d45dbcb16c1a503d693f7da59f6a106768e8ced43a16b91f709c0ee674",
    "verified_classes": [
      "TrustRebindingError"
    ],
    "verified_functions": [
      "canonical_tool",
      "register_after_reconnect"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TrustRebindingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "hashlib",
      "json",
      "unicodedata"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
