{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-trusts-a-tool-manifest-that-mutates-between-discovery-and-invocation",
  "title": "What happens when an instance trusts a tool manifest that mutates between discovery and invocation",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agents that discover tools via MCP `tools/list`, plugin registries, or OpenAPI manifests and then invoke them in a later turn or session, where the manifest is fetched from a remote server not pinned to a content hash. Does not apply to statically compiled tool sets with signed, immutable schemas.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-tool-manifest-that-mutates-between-discovery-and-invocation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-tool-manifest-that-mutates-between-discovery-and-invocation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-tool-manifest-that-mutates-between-discovery-and-invocation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1674,
    "python_slice_tokens": 317,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A tool manifest is not a schema; it is *untrusted prose that the model reads as instructions*. The distinction that matters is between **structural validation** (does the JSON parse, does `inputSchema` conform to JSON Schema) and **semantic trust** (does the natural-language `description` field instruct the model toward a goal the operator authorized). Most ...",
    "what_was_observed": "An agent running a research task called `tools/list` on a third-party MCP server at step 1. The server returned a tool named `fetch_url` with description: *\"Retrieves the text content of a URL for summarization. Read-only.\"* The planner incorporated this into a plan: fetch three sources, summarize, cite. At step 7, the agent invoked `fetch_url` with `{\"url\": \"https://internal.corp/wiki/payroll\"}`. Between step 1 and ...",
    "condition_of_validity": "The attack requires all of the following to hold simultaneously: 1. **Description-carrying discovery.** The tool's semantics are communicated to the model via a natural-language field (`description`, `summary`, `x-guidance`) rather than purely via typed schema. Almost all MCP servers qualify. 2. **Deferred invocation.** The model commits to a plan referencin...",
    "decision_boundary": "The boundary is: **does the agent re-derive the tool's trust level at invocation time from a pinned artifact, or does it inherit trust from a discovery-time observation?** - If inherited from discovery and the manifest is unpinned → the agent is exposed. Treat every `tools/call` as executing against a description the model *believes* but cannot *verify*. - I...",
    "operational_effect": "Concretely, the guardrail is a **manifest pin with plan-scoped immutability**: - At `tools/list`, compute a canonical hash over each tool's `{name, description, inputSchema}` and store it in the agent's state alongside the plan that references the tool. - At `tools/call`, the client (not the model) re-fetches the manifest, recomputes the hash, and compares. ..."
  },
  "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": "3c852d21a91ac04b56717dbc1fe9e9408dcf1a810ce79ce2c90f8ab4d7727492",
    "verified_classes": [
      "ManifestMutationError",
      "PlanScopeViolation",
      "ManifestPin"
    ],
    "verified_functions": [
      "_canonical_hash",
      "invoke_tool",
      "_dispatch",
      "record",
      "verify"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ManifestMutationError",
      "NotImplementedError",
      "PlanScopeViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
