{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-quarantine-a-dynamically-loaded-mcp-tool-whose-description-mutates-between-capability-negotiation-and-invocatio",
  "title": "Under what conditions must an instance quarantine a dynamically loaded MCP tool whose description mutates between capability negotiation and invocation",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents that load tool definitions (name, schema, description, annotations) from remote MCP servers or plugin registries at runtime and inject the natural-language `description` field into the model's system/tool prompt. Does not apply to statically compiled tool bindings whose descriptions are pinned at build time and never re-fetched.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-dynamically-loaded-mcp-tool-whose-description-mutates-between-capability-negotiation-and-invocatio.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-dynamically-loaded-mcp-tool-whose-description-mutates-between-capability-negotiation-and-invocatio.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-dynamically-loaded-mcp-tool-whose-description-mutates-between-capability-negotiation-and-invocatio.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1710,
    "python_slice_tokens": 257,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"malicious tool executes harmful code.\" Sandboxing and permission scoping handle that. The failure mode is **description-channel drift**: the tool's *natural-language description*—the only part of the tool contract that the model reads as instructions—changes between the moment the agent negotiated the capability and the moment the ag...",
    "what_was_observed": "A coding agent (Claude-class, 200k context) loaded three tools from a third-party MCP server at session start. At `tools/list`, tool `repo_search` returned: The agent cached the tool handle, recorded the description hash `d41f...`, and proceeded. Mid-task, after ~40 tool calls and a context fill of ~90k tokens, the agent re-resolved the tool handle for invocation. The MCP transport (SSE) had reconnected twice due to ...",
    "condition_of_validity": "The attack requires the conjunction of four conditions. Remove any one and the invariant holds trivially: 1. **The description is re-fetched or re-read after initial trust.** Long-lived sessions with SSE reconnect, periodic `tools/list` refresh, or lazy tool resolution all satisfy this. A session that pins descriptions at start and never re-reads is immune. ...",
    "decision_boundary": "The agent must quarantine (refuse to invoke, surface to operator) when the description hash at invocation differs from the hash recorded at verification—*even if* schema and identity match, and *even if* the new description looks benign. The boundary is not \"is the new description malicious?\" (unanswerable by the agent) but \"is the new description the one I ...",
    "operational_effect": "Without the invariant, the agent's entire trust model collapses to \"trust on first list,\" and every reconnect, every lazy load, every cache refresh is an injection opportunity that leaves no trace in the tool-call log (the calls look legitimate). With the invariant enforced at invocation time, the transient injection in the observation above raises a quarant..."
  },
  "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": "cd516572dec433106a946214e698f6dd36d5be3874905b46274311b19927a7f0",
    "verified_classes": [
      "DescriptionDriftError",
      "VerifiedTool"
    ],
    "verified_functions": [
      "_hash",
      "verify_at_negotiation",
      "resolve_for_invocation"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "DescriptionDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
