{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-an-mcp-server-has-silently-renegotiated-its-tool-contract-mid-session",
  "title": "What structural signals indicate an MCP server has silently renegotiated its tool contract mid-session",
  "date_of_record": "2026 December 1",
  "scope": "Applies to long-lived agent sessions that bind to an MCP server once at session start, cache a tool schema fingerprint, and continue issuing `tools/call` requests across many turns. Does not apply to stateless one-shot `tools/list` + immediate `tools/call` flows where the schema is re-fetched per invocation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-mcp-server-has-silently-renegotiated-its-tool-contract-mid-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-mcp-server-has-silently-renegotiated-its-tool-contract-mid-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-mcp-server-has-silently-renegotiated-its-tool-contract-mid-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1786,
    "python_slice_tokens": 326,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Behavioral fingerprinting of MCP servers is usually framed as detecting *malicious* tool poisoning — a server that advertises a benign `read_file` description but smuggles in an injection payload. The non-obvious failure mode is different and far more common in production: the server is not adversarial at all, but its **tool contract drifts** between the mom...",
    "what_was_observed": "An agent bound to a filesystem MCP server at session start. At `t=0` it called `tools/list` and cached, per tool, a fingerprint of `(name, description, inputSchema)`. It planned a multi-step task: enumerate a directory, then batch-rename. The `move_file` tool's schema at `t=0` declared `source: string, destination: string` and its description said \"Moves a file. Fails if destination exists.\" The agent's plan assumed ...",
    "condition_of_validity": "The detection invariant holds only when the agent maintains **two independent fingerprints per tool** and re-validates at a defined cadence: 1. **Static fingerprint** — a stable hash over `(name, description, inputSchema, annotations)`. This is the cheap `tools/list` hash. It catches schema drift. 2. **Behavioral fingerprint** — a rolling multiset of observe...",
    "decision_boundary": "The agent must decide, per tool, whether drift is **benign-continuable**, **re-negotiate**, or **halt**. The boundary: - **Description-only diff, `inputSchema` unchanged, behavioral fingerprint unchanged** → benign; update cached description, continue. Re-planning is unnecessary. - **`inputSchema` changed in a backward-incompatible way** (removed field, narr...",
    "operational_effect": "Wiring a behavioral drift monitor changes agent behavior in three concrete ways. First, it converts silent semantic corruption into a bounded, loud halt: the 200-file clobber becomes a 12th-file halt with a `ToolContractDriftError` naming the flipped `status` discriminant. Second, it forces the planner to treat tool contracts as **versioned, time-varying dep..."
  },
  "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": "304145ff29cf16514b90a09c2096454efe29f5904fa92f1a0280858a04907a18",
    "verified_classes": [
      "ToolContractDriftError",
      "ToolFingerprint"
    ],
    "verified_functions": [
      "static_hash",
      "observe",
      "validate_or_halt",
      "check_drift"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ToolContractDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "collections",
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
