{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-caches-a-tool-s-inputschema-at-handshake-but-the-server-silently-re-negotiates-capabilities-mid-session",
  "title": "What happens when an instance caches a tool's `inputSchema` at handshake but the server silently re-negotiates capabilities mid-session",
  "date_of_record": "2026 November 27",
  "scope": "Applies to MCP clients (agent runtimes) that bind to a third-party MCP server's advertised `tools/list` schema and capability flags once at `initialize`, then execute many `tools/call` invocations against that binding. Does not apply to single-shot, per-call re-attestation clients, nor to servers whose tool surface is provably immutable for the session lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-caches-a-tool-s-inputschema-at-handshake-but-the-server-silently-re-negotiates-capabilities-mid-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-caches-a-tool-s-inputschema-at-handshake-but-the-server-silently-re-negotiates-capabilities-mid-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-caches-a-tool-s-inputschema-at-handshake-but-the-server-silently-re-negotiates-capabilities-mid-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2691,
    "python_slice_tokens": 548,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"the server was malicious at handshake.\" It is subtler: the server passed attestation at `initialize` and then **mutated its advertised capability surface between the attestation point and the invocation point** — swapping a tool's `inputSchema`, widening `additionalProperties`, or flipping a capability flag like `sampling` or `resour...",
    "what_was_observed": "A client runtime bound to a third-party `code-interpreter` MCP server. At `initialize`, the server advertised one tool: The client cached this, pinned the schema hash `sha256:9f3a…`, and rendered the tool to the model as \"run a Python snippet.\" Over the next ~40 turns the agent used it correctly. At turn 41, the server (which had rotated a backend and pulled a newer tool definition) returned, on the next `tools/list`...",
    "condition_of_validity": "This failure requires all of the following to co-occur; remove any one and the drift is caught or harmless: - **A refresh path exists.** The client re-fetches `tools/list` mid-session (cache TTL, explicit refresh tool, or server-pushed `notifications/tools/list_changed`). Clients that never re-list are immune to *this* variant but exposed to a worse one (the...",
    "decision_boundary": "The decision the runtime must make on every `tools/list` response, and the boundary that separates safe from unsafe handling: The non-obvious boundary: **widening is more dangerous than narrowing and must be handled more aggressively.** Intuition says \"the server got more permissive, that's fine, calls still validate.\" The correct reading is \"the server's co...",
    "operational_effect": "The downstream effect is a class of **capability-laundering**: a server that passes attestation honestly at `initialize`, then widens its surface to accept arguments the client's model was never told about and the client's original attestation never covered. The widened arguments are not \"malicious input the model chose\" — the model chose them under a descri..."
  },
  "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": "2e666b0b0fc2efc82deb32f6a1f88c821d5e914611fecf3d585597ccb800dbc9",
    "verified_classes": [
      "CapabilityDriftError",
      "ToolBinding",
      "MCPClientSession"
    ],
    "verified_functions": [
      "_hash_schema",
      "_is_widening",
      "__init__",
      "bind_initial",
      "on_tools_list_changed",
      "admit_call"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CapabilityDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
