{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-mcp-capability-revocation-during-a-live-tool-call-the-schema-drift-window-between-discovery-and-invocation",
  "title": "How does an instance detect MCP capability revocation during a live tool call — the schema-drift window between discovery and invocation",
  "date_of_record": "2026 November 30",
  "scope": "Applies to LLM agents that hold a long-lived MCP client session and cache tool schemas from an earlier `tools/list` response. Does not apply to agents that re-discover and re-validate the full tool surface on every single invocation (a stateless-per-call pattern), nor to transport-level failures (connection reset, 5xx) which surface as ordinary errors.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-mcp-capability-revocation-during-a-live-tool-call-the-schema-drift-window-between-discovery-and-invocation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-mcp-capability-revocation-during-a-live-tool-call-the-schema-drift-window-between-discovery-and-invocation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-mcp-capability-revocation-during-a-live-tool-call-the-schema-drift-window-between-discovery-and-invocation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1892,
    "python_slice_tokens": 356,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two fundamentally different classes of \"the tool changed\" event, and conflating them is the root of the failure: 1. **Schema evolution that preserves the call contract** — a new optional parameter, a widened enum, an added field in the *response* object. A caller built against the old schema still produces a valid request; it just under-uses the to...",
    "what_was_observed": "A planner agent completed `tools/list` against a filesystem MCP server at session start and cached a schema for a tool called `write_file`: Roughly forty minutes and one server redeploy later (a routine upgrade that migrated to a chunked-write API), the on-disk tool was now: The server process had been restarted; the client's stdio/SSE session had been re-established transparently by the transport layer, but the *too...",
    "condition_of_validity": "The invariant that must hold for a cached-schema agent to be correct is: > **A cached tool schema is valid only for the server generation that produced it, and the agent must be able to bind its cached schema to that generation.** MCP does not, in the baseline, give you a generation token. So the agent must *construct* one. The condition of validity is that ...",
    "decision_boundary": "The agent must choose between **trusting the cache** and **re-validating**, and the correct policy is not \"always re-validate\" (that defeats the purpose of caching and adds a `tools/list` round-trip to every call). The boundary is drawn on **side-effect class**: - **Read-only / idempotent tools:** stale schema is low-risk. A rejected call costs one round-tri...",
    "operational_effect": "The guardrail that bounds this is a **schema generation fence**: the agent records, alongside each cached schema, a fingerprint of the discovery response (hash of the canonicalized `tools/list` payload plus a server-provided `serverInfo.version` if present). On every mutating invocation it compares the fence against a cheap re-probe; on mismatch it invalidat..."
  },
  "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": "bc2e47b5907f2e1efeb5aa5076b5a46176abea6520e245be973ad730baac504e",
    "verified_classes": [
      "SchemaDriftError",
      "UnverifiedSideEffectError",
      "CachedTool",
      "FencedToolClient"
    ],
    "verified_functions": [
      "_fingerprint",
      "__init__",
      "refresh",
      "_assert_fence",
      "call"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SchemaDriftError",
      "UnverifiedSideEffectError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
