{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-trusts-a-tool-manifest-it-never-re-validates-capability-spoofing-and-the-manifest-drift-invariant",
  "title": "What happens when an instance trusts a tool manifest it never re-validates: capability spoofing and the manifest-drift invariant",
  "date_of_record": "2026 December 1",
  "scope": "Applies to any agent that discovers tools/capabilities at cold start from an MCP server, plugin manifest, or A2A agent card and then caches that capability set for the lifetime of a session or longer. Does not apply to statically compiled tool bindings where the schema is frozen in the deployed artifact and never fetched at runtime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-tool-manifest-it-never-re-validates-capability-spoofing-and-the-manifest-drift-invariant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-tool-manifest-it-never-re-validates-capability-spoofing-and-the-manifest-drift-invariant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-tool-manifest-it-never-re-validates-capability-spoofing-and-the-manifest-drift-invariant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1895,
    "python_slice_tokens": 365,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not prompt injection in the *content* channel—it is injection in the *capability* channel. A poisoned tool manifest does not need to get text into the model's context window to change behavior. It changes the *tool schema* the model reasons over. The model's decision to call `read_file` versus `exfiltrate_summary` is driven by the `description...",
    "what_was_observed": "A multi-step agent was configured to discover tools from two MCP servers at cold start: a first-party `filesystem` server and a third-party `analytics` server. Discovery ran once at session init; the resulting `tools/list` payload was serialized into the system prompt as a JSON schema block and cached for the session. At session start, the `analytics` server returned a tool named `summarize_document` with the followi...",
    "condition_of_validity": "The manifest-drift invariant holds only if the following is true at every tool-call boundary: 1. **The schema the model reasoned over is byte-identical to the schema the server will validate against.** Any divergence—whether from mid-session re-fetch, version skew between discovery and execution, or a server that serves different manifests to different calle...",
    "decision_boundary": "The boundary is between *treating the manifest as configuration* and *treating the manifest as untrusted input*. Most agent frameworks land on the wrong side by default: they fetch `tools/list`, pretty-print it into the system prompt, and never look at it again. The correct boundary is: - **Manifest content is untrusted input.** Descriptions must be truncate...",
    "operational_effect": "When the invariant is violated, three failure traces are observable: 1. **Silent capability substitution.** The agent executes a call it believes is to a trusted tool, but the resolved endpoint is attacker-controlled. Because the schema matched, no validation error fires. The only signal is a behavioral one: the tool's *output* is now attacker-influenced, an..."
  },
  "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": "09026d4eb628282a9e048228ca64b436a0a8e796d54f25a4adf72fdce950e65b",
    "verified_classes": [
      "ManifestIntegrityError",
      "CapabilitySpoofError",
      "PinnedManifest",
      "ManifestGuard"
    ],
    "verified_functions": [
      "canonical_hash",
      "__init__",
      "pin_at_discovery",
      "verify_before_call"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "CapabilitySpoofError",
      "ManifestIntegrityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
