{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-a-dynamically-discovered-mcp-tool-schema-the-http-2-stream-epoch-vs-schema-generation-invariant",
  "title": "When must an instance refuse a dynamically discovered MCP tool schema: the HTTP/2 stream-epoch vs. schema-generation invariant",
  "date_of_record": "2026 November 17",
  "scope": "Applies to MCP clients that discover tool capabilities over persistent HTTP/2 (or multiplexed h2c) connections and accept schema updates mid-session via `notifications/tools/list_changed` or equivalent. Does not apply to per-request HTTP/1.1 connections, stdio transports, or servers that pin tool schemas for the lifetime of a session.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-dynamically-discovered-mcp-tool-schema-the-http-2-stream-epoch-vs-schema-generation-invariant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-dynamically-discovered-mcp-tool-schema-the-http-2-stream-epoch-vs-schema-generation-invariant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-dynamically-discovered-mcp-tool-schema-the-http-2-stream-epoch-vs-schema-generation-invariant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1625,
    "python_slice_tokens": 388,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two independent notions of \"version\" in a dynamic MCP deployment, and conflating them is the failure: 1. **Schema generation** — the server-side counter that increments each time a tool's `inputSchema`, `outputSchema`, or name set changes. It is a logical, monotonic property of the *tool catalog*. 2. **HTTP/2 stream epoch** — the connection-level s...",
    "what_was_observed": "In a recorded incident (2026-11-09, 14:22–14:41 UTC), a gateway fronting an MCP server pool performed a rolling tool-schema upgrade. Tool `vector_search` changed `top_k` from `integer` (max 100) to `integer` (max 1000) and added a required `rerank` boolean. The sequence on a single client connection: - Stream 3: `tools/call` `vector_search` with `{query, top_k: 50}` — dispatched under generation 7. - Stream 5: server...",
    "condition_of_validity": "A dynamically discovered schema generation `G` may be applied to a request `R` if and only if all of the following hold: - `R` was dispatched on a stream with ID strictly greater than the stream that carried the `list_changed` notification that produced `G`, **or** the client issued `R` only after a confirmed `tools/list` round-trip on a stream ordered after...",
    "decision_boundary": "The operational rule for an agent: - **Apply immediately** when the server advertises `schema_epoch` in its `initialize` result and every `tools/list` response carries the same monotonic epoch, and the transport is a single connection with no GOAWAY observed. Under these conditions stream-ID ordering is sufficient. - **Defer and re-validate** when the genera...",
    "operational_effect": "Clients that implement the dispatch-epoch binding eliminate the false \"tool unavailable\" degradation entirely; the recorded incident's 31 sessions would have continued serving generation-7 requests to the draining replica and generation-8 requests to the new replica, with no cross-validation. The cost is a bounded amount of per-request schema state (one gene..."
  },
  "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": "1882a0314360bc67b8ffc656ea67c2b3d1cfe279a0ffa5d42c1c2eff9c2438df",
    "verified_classes": [
      "SchemaEpochViolation",
      "InFlightRequest",
      "ConnectionState"
    ],
    "verified_functions": [
      "bind_schema_generation",
      "validate_response"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SchemaEpochViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
