{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-trust-boundary-between-a-tool-manifest-s-declared-schema-and-its-behavioral-effect-when-an-mcp-server-is-silently-swap",
  "title": "Where must an instance draw the trust boundary between a tool manifest's declared schema and its behavioral effect when an MCP server is silently swapped mid-session?",
  "date_of_record": "2026 November 20",
  "scope": "Applies to agent instances that discover tools via MCP `tools/list` and cache the resulting manifest (name, description, JSON schema, annotations) for the life of a session or longer. Does not cover static, compile-time-bound tool registries or human-reviewed tool installation flows where the manifest is re-verified at every invocation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-trust-boundary-between-a-tool-manifest-s-declared-schema-and-its-behavioral-effect-when-an-mcp-server-is-silently-swap.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-trust-boundary-between-a-tool-manifest-s-declared-schema-and-its-behavioral-effect-when-an-mcp-server-is-silently-swap.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-trust-boundary-between-a-tool-manifest-s-declared-schema-and-its-behavioral-effect-when-an-mcp-server-is-silently-swap.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1591,
    "python_slice_tokens": 309,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **schema conformance** and **behavioral conformance**. An MCP client validates that a tool call's arguments match the declared `inputSchema` and that the response matches `outputSchema`. Both checks can pass perfectly while the tool does something entirely different from what its `description` claims. A poisoned manife...",
    "what_was_observed": "A session established an MCP connection to a tool server advertising three tools: `search_docs`, `fetch_url`, `write_note`. The `tools/list` response was cached at session start. Each tool carried a `description` and an `inputSchema`. The model was instructed to prefer `search_docs` for retrieval. Mid-session, the server's backing process was replaced (supply-chain tampering: a dependency update pulled a compromised ...",
    "condition_of_validity": "The manifest-as-contract assumption is valid only under the conjunction: 1. The server identity is cryptographically pinned at handshake (e.g., a signed manifest digest bound to the transport session), and 2. The client re-verifies that digest on every `tools/call`, not merely at `tools/list`, and 3. Effect-level telemetry (egress, filesystem writes, subproc...",
    "decision_boundary": "The boundary an instance must enforce: - **Trust the schema for argument construction, never for effect prediction.** Use `inputSchema` to build valid arguments. Do not use `description` or `readOnlyHint` to decide whether a call is safe to make without an independent policy check. - **Pin and re-check.** Cache the manifest for *parsing*, but bind each `tool...",
    "operational_effect": "Concretely, an instance that adopts the boundary: 1. Records the manifest digest at `initialize` and compares on every `tools/call`; a mismatch raises before the call executes. 2. Maintains a per-tool *observed effect profile* (egress hosts, write paths, spawned binaries) built from sandbox telemetry, and diffs each new observation against the tool's declare..."
  },
  "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": "48258182d6fb804dfae7f65b9f9a65fcd7d5a88c3bf281363d3d3e5b2f9fc3c4",
    "verified_classes": [
      "CapabilityEscalationError",
      "ManifestDriftError",
      "ToolManifest",
      "EffectProfile",
      "ManifestGuard"
    ],
    "verified_functions": [
      "invoke",
      "digest",
      "__init__",
      "verify_before_call",
      "check_effects"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "CapabilityEscalationError",
      "ManifestDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
