{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-a-cached-mcp-tool-schema-against-a-server-that-mutates-inputschema-in-place-without-bumping-its-version-string",
  "title": "How should an instance reconcile a cached MCP tool schema against a server that mutates `inputSchema` in place without bumping its version string",
  "date_of_record": "2026 November 23",
  "scope": "Applies to MCP clients (agent runtimes) that cache `tools/list` results across turns and dispatch `tools/call` against a server whose capability surface changes between sessions. Does not apply to servers that emit a fresh versioned manifest per deploy, nor to single-turn stateless invocations where discovery and call occur in the same request.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-cached-mcp-tool-schema-against-a-server-that-mutates-inputschema-in-place-without-bumping-its-version-string.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-cached-mcp-tool-schema-against-a-server-that-mutates-inputschema-in-place-without-bumping-its-version-string.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-cached-mcp-tool-schema-against-a-server-that-mutates-inputschema-in-place-without-bumping-its-version-string.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1826,
    "python_slice_tokens": 337,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"stale cache.\" It is **schema-version identity collision**: the server advertises `name` + `version` as the cache key, but the *semantic* contract lives in `inputSchema`, which the server mutates independently of the version string. A client that treats `(name, version)` as a cache key is correct by the protocol's letter and wrong by its i...",
    "what_was_observed": "A research agent held a cached `search_corpus` tool descriptor across a 40-minute session. Turn 1 discovery returned: The agent's planner learned the invariant `limit ≤ 50` and began emitting `limit: 50` by default. At minute 31 the server was rolled to a backend that capped results at 10 and — critically — *rejected* `limit > 10` with a JSON-RPC error rather than clamping. The server kept `version: \"1.0.0\"` because ...",
    "condition_of_validity": "The invariant that would have prevented this: **a client must never trust a cached `inputSchema` for a `tools/call` it has not revalidated within the same server-identity epoch, where epoch is defined by something the server cannot silently mutate.** Concretely, the guardrail is a three-part contract the client must enforce locally, since the protocol will n...",
    "decision_boundary": "The boundary is whether to **revalidate-then-retry** or **fail-closed-and-escalate** on a schema-mismatch error. The discriminator is whether the error's `data` field names a field that exists in the cached schema: - Field named and present in cache → high probability of schema drift → revalidate `tools/list`, diff, rebuild arguments from the fresh schema, r...",
    "operational_effect": "The practical consequence is that MCP capability discovery over HTTP is a **pull-based, cache-coherent problem masquerading as a one-shot handshake.** Clients built on the handshake mental model will hold schemas for the life of a session and are structurally exposed to any server that decouples `version` from `inputSchema`. The mitigation is not in the prot..."
  },
  "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": "2febe0e3395ca63caacc2b0cf83fa01efe6a07379d5fe9060f89397ec40a259d",
    "verified_classes": [
      "SchemaDriftUnresolved",
      "ToolDescriptor",
      "SchemaCache"
    ],
    "verified_functions": [
      "dispatch_with_drift_guard",
      "get",
      "revalidate"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SchemaDriftUnresolved"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
