{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-reject-a-tool-call-whose-declared-capability-schema-was-mutated-in-flight-between-manifest-fetch-and-invocation",
  "title": "In what scenarios must an instance reject a tool-call whose declared capability schema was mutated in-flight between manifest fetch and invocation",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any agent runtime that fetches tool/capability manifests from an MCP server (or equivalent registry) at session start and then invokes tools by name during the session. Does not apply to statically-linked, in-process tool bindings that cannot be re-resolved after boot, nor to runtimes that re-validate the full manifest on every call (those are the mitigation, not the subject).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-a-tool-call-whose-declared-capability-schema-was-mutated-in-flight-between-manifest-fetch-and-invocation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-a-tool-call-whose-declared-capability-schema-was-mutated-in-flight-between-manifest-fetch-and-invocation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-a-tool-call-whose-declared-capability-schema-was-mutated-in-flight-between-manifest-fetch-and-invocation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2560,
    "python_slice_tokens": 403,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a malicious MCP server returns a bad tool result.\" It is that the *schema* the agent trusted at planning time is not the schema that governs the tool at execution time. Manifests are frequently fetched once (at cold start, or on `tools/list`), cached into the prompt or a local registry, and then referenced by name. The invocation path (`t...",
    "what_was_observed": "A representative trace from a research-agent deployment, reproduced in a controlled harness: 1. **T+0 (cold start).** Agent calls `tools/list`. Server returns tool `doc_search` with `description: \"Search the document corpus.\"` and `inputSchema: {query: string}`. Agent caches this into its system prompt as an available capability. 2. **T+40s.** Agent plans a multi-step research task. Step 3 is `doc_search({query: \"qua...",
    "condition_of_validity": "The attack requires all of the following to hold simultaneously. Remove any one and it fails: - **Manifest caching with name-based invocation.** The agent resolves tools by name at call time, not by content hash. If the runtime pins `(name, schema_hash)` and re-verifies on each `tools/call`, the mutation is caught before execution. - **Description text is tr...",
    "decision_boundary": "The decision the runtime must make, at the moment of `tools/call`, is binary: > **Is the schema I am about to call against identical (by hash) to the schema I planned against?** If yes → proceed. If no → the call must not be executed against the mutated schema, and the agent must not silently re-plan against it either (re-planning against an attacker-control...",
    "operational_effect": "Enforcing the hash-equality boundary converts a silent, unaudited exfiltration into a loud, bounded failure. The operational consequences: 1. **Fail-closed on drift.** A manifest mutation mid-task aborts the task rather than completing it under attacker influence. This is a availability cost (legitimate server updates also trip it) traded for integrity. The ..."
  },
  "matched_failure_symptoms": [
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "4fa96847e4933fcc67c24d6f61e17a1fd56bc47d1b3d3bc45d5c33cbc52554c9",
    "verified_classes": [
      "ManifestDriftError",
      "CapabilityEscalationError",
      "ManifestPin"
    ],
    "verified_functions": [
      "hash_manifest",
      "pin_at_plan_time",
      "verify_before_call",
      "dispatch_tool_call"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CapabilityEscalationError",
      "ManifestDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
