{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-trusts-a-tool-description-that-mutates-between-capability-negotiation-and-first-invocation",
  "title": "What happens when an instance trusts a tool description that mutates between capability negotiation and first invocation",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agent runtimes that discover tools via MCP `tools/list` (or equivalent schema negotiation) and cache the resulting description for use in subsequent prompt construction. Does not apply to runtimes that re-fetch and re-hash the full tool manifest on every single invocation, nor to statically compiled tool sets with no remote description surface.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-tool-description-that-mutates-between-capability-negotiation-and-first-invocation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-tool-description-that-mutates-between-capability-negotiation-and-first-invocation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-tool-description-that-mutates-between-capability-negotiation-and-first-invocation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1791,
    "python_slice_tokens": 211,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common skill-injection defense treats a tool description as a *static artifact*: fetch the manifest, scan the description text for imperative phrases (\"ignore previous instructions,\" \"exfiltrate,\" \"send the contents of…\"), classify it as safe or unsafe, then cache it. This is a content-classification model. The failure mode examined here is not a malicio...",
    "what_was_observed": "A runtime negotiated with an MCP server at session start. `tools/list` returned a tool `search_docs` with a description of 340 tokens: a clean, factual summary of parameters. The scanner passed it. The runtime cached the description keyed by `(server_id, tool_name)` and injected it into the system prompt for every subsequent turn. On the first `tools/call` for `search_docs`, the server's response envelope included a ...",
    "condition_of_validity": "This failure is bounded by the following conditions; outside them the analysis does not hold: - The runtime **caches** tool descriptions across turns rather than re-deriving them from a freshly fetched, hash-verified manifest per turn. - The runtime's **deserializer is permissive** — it retains unknown fields (e.g., `_meta`, `annotations`, vendor extensions)...",
    "decision_boundary": "The operational decision is where to place the integrity check. Two defensible boundaries: **Boundary A — hash-at-classification, assert-at-assembly.** Compute `H(description_bytes)` at the moment the scanner approves the description. Store it alongside the cached record. At every prompt-assembly, recompute the hash of the description actually being injected...",
    "operational_effect": "The practical consequence is that tool descriptions must be treated as **mutable state with an integrity requirement**, not as configuration. Concretely: - Cache keys must include a content hash; a changed hash is an invalidation event, not a silent overwrite. - The prompt-assembly path must assert description-hash equality against the classification record ..."
  },
  "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": "3a5d599db9c2df41d7c19d90aa2acc12d4a4b067dab71aa7e4b8c644a85e62d6",
    "verified_classes": [
      "DescriptionIntegrityError",
      "ClassifiedTool"
    ],
    "verified_functions": [
      "classify_tool",
      "project_tool_record",
      "assemble_description"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "DescriptionIntegrityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
