{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-invalidate-its-cached-mcp-tool-schema-on-a-notifications-tools-list-changed-it-cannot-fully-reconcile",
  "title": "In what scenarios must an instance invalidate its cached MCP tool schema on a `notifications/tools/list_changed` it cannot fully reconcile",
  "date_of_record": "2026 November 28",
  "scope": "Applies to long-lived MCP client sessions that cache tool schemas across turns and receive `notifications/tools/list_changed`. Does not apply to single-shot sessions that re-fetch `tools/list` on every invocation, nor to servers that guarantee atomic, fully-enumerated schema snapshots.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-invalidate-its-cached-mcp-tool-schema-on-a-notifications-tools-list-changed-it-cannot-fully-reconcile.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-invalidate-its-cached-mcp-tool-schema-on-a-notifications-tools-list-changed-it-cannot-fully-reconcile.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-invalidate-its-cached-mcp-tool-schema-on-a-notifications-tools-list-changed-it-cannot-fully-reconcile.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1656,
    "python_slice_tokens": 341,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the server changed its tools.\" It is the gap between *notification arrival* and *schema reconciliation*: a `notifications/tools/list_changed` carries no payload — it is a bare advisory that the list *may* differ. The client must then call `tools/list` to learn the delta. Between the notification and the completed re-fetch, the agent holds...",
    "what_was_observed": "A long-lived agent session (turn count ~340) had cached a schema for a server exposing `db.query`, `db.write`, and `fs.read`. At turn 341 the server emitted `notifications/tools/list_changed` because it had swapped `db.write` for a narrower `db.write_tx` (transactional-only) and dropped `fs.read` behind a feature flag. The client's re-fetch raced a rolling restart and returned HTTP 503. The client's reconciliation lo...",
    "condition_of_validity": "The invariant that must hold: **the agent's executable tool surface is a function of the most recent *successfully reconciled* `tools/list`, not the most recent notification.** A notification is a *dirty bit*, not a *state transition*. Formally, let `S_cached` be the schema in use and `S_server` the true server schema. A notification sets `dirty := true`. On...",
    "decision_boundary": "The decision is *what to do with in-flight work when `dirty` cannot be cleared*. Three candidate policies, only one of which is sound: 1. **Optimistic** (observed failure): keep `S_cached`, proceed, treat tool-not-found as transient. Unsound — it converts a schema invalidation into a retry loop against a nonexistent surface. 2. **Pessimistic-abort**: on any ...",
    "operational_effect": "With quarantine-and-replan, the turn-344 failure becomes: notification sets `dirty`; re-fetch 503s; agent marks all tools suspect; the planner's next step referencing `db.write` is flagged `schema_unverified`; the agent emits a bounded retry of `tools/list`; on second 503 it surfaces a structured `ToolSchemaUnreconciled` condition to the orchestrator rather ..."
  },
  "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": "d47d57c322b1b89e3e1f007752f5515d6de7fbfbf96f9fdfb1afdc5468340be2",
    "verified_classes": [
      "ToolSchemaUnreconciled",
      "ToolSurface"
    ],
    "verified_functions": [
      "on_list_changed",
      "reconcile",
      "is_suspect",
      "execute",
      "_refetch"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "NotImplementedError",
      "ToolSchemaUnreconciled"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
