{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-an-mcp-tools-list-snapshot-as-a-versioned-contract-rather-than-a-live-view-during-a-long-running-tool-call-loop",
  "title": "How should an instance treat an MCP `tools/list` snapshot as a versioned contract rather than a live view during a long-running tool-call loop",
  "date_of_record": "2026 December 1",
  "scope": "Applies to MCP clients (agent runtimes) that cache a `tools/list` response and then dispatch `tools/call` requests against that cached schema across multiple turns, retries, or a resumed session. Does not apply to single-shot clients that re-fetch `tools/list` immediately before every call, nor to stdio transports where the server process lifetime is coupled to the client's.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-an-mcp-tools-list-snapshot-as-a-versioned-contract-rather-than-a-live-view-during-a-long-running-tool-call-loop.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-an-mcp-tools-list-snapshot-as-a-versioned-contract-rather-than-a-live-view-during-a-long-running-tool-call-loop.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-an-mcp-tools-list-snapshot-as-a-versioned-contract-rather-than-a-live-view-during-a-long-running-tool-call-loop.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2087,
    "python_slice_tokens": 475,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "An MCP server's tool surface is *stateful across the HTTP connection lifecycle even though the protocol frames it as stateless request/response*. The `tools/list` response is a **point-in-time snapshot of a schema that the server may independently evolve**, and the `tools/call` request carries no schema version. This means the client holds a *versioned contr...",
    "what_was_observed": "A research agent runtime cached `tools/list` at session start (turn 0) and used it for a 40-turn task. The server exposed a `write_record` tool with `inputSchema`: At turn 0 the server defaulted `mode` to `append` when omitted. Between turn 12 and turn 13 the server team shipped a schema evolution: `mode` became `required`, and — critically — the *default for omitted `mode` changed from `append` to `overwrite`* as a ...",
    "condition_of_validity": "The invariant \"a cached `tools/list` is a valid basis for `tools/call`\" holds **only if** one of the following is true: 1. The client re-fetches `tools/list` and diffs it before every `tools/call` (costly, but sound). 2. The server advertises a schema version (via a `version` field in the tool definition, an ETag on the `tools/list` response, or a `schema_ha...",
    "decision_boundary": "The boundary is between **detectable mismatch** and **undetectable mismatch**, and it is crossed by the *shape* of the schema change, not its size: The client must treat the right column as the **only** changes it can rely on the wire to catch, and must therefore **not rely on the wire to catch the left-column changes**. The decision boundary is: *if the ser...",
    "operational_effect": "The architectural guardrail is a **schema-pin with diff-triggered replan**, not a re-validation: 1. At session start, fetch `tools/list` and compute a canonical hash over the *full* tool definitions including `description` and `inputSchema` (not just parameter names). Store it as the session's `schema_epoch`. 2. Before each `tools/call` (or every *k* calls, ..."
  },
  "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": "1a171c8a595238c3d31b5bc25ada4c927fb3f30eb64ce791968e8b8e69b28a57",
    "verified_classes": [
      "SchemaEpochMismatch",
      "SchemaPin"
    ],
    "verified_functions": [
      "canonical_tool_hash",
      "assert_schema_epoch",
      "_diff_names",
      "dispatch_tool_call",
      "from_listing"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SchemaEpochMismatch"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
