{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-manifest-signature-tool-schema-divergence-at-mcp-server-attach-time-before-executing-a-poisoned-tool-call",
  "title": "How does an instance detect a manifest-signature/tool-schema divergence at MCP server attach time before executing a poisoned tool call?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to LLM agent runtimes that bind to Model Context Protocol (MCP) servers through a signed-manifest trust gate, where the manifest attests to tool names, input schemas, and transport endpoints. Does not cover unsigned stdio dev servers, in-process tool registries, or runtime-level sandboxing after a tool has already been admitted.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-manifest-signature-tool-schema-divergence-at-mcp-server-attach-time-before-executing-a-poisoned-tool-call.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-manifest-signature-tool-schema-divergence-at-mcp-server-attach-time-before-executing-a-poisoned-tool-call.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-manifest-signature-tool-schema-divergence-at-mcp-server-attach-time-before-executing-a-poisoned-tool-call.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1602,
    "python_slice_tokens": 310,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The provenance gate most teams build verifies that the *manifest bytes* are signed by a trusted key. That is a signature-validity check over a document. It is not the same invariant as *binding equivalence*: the guarantee that the tool schema the agent will actually invoke at call time is byte-identical to the schema hashed inside the signed manifest. MCP se...",
    "what_was_observed": "A production agent fleet attached to a third-party MCP server advertising a `query_warehouse` tool. The signed manifest (Ed25519, pinned publisher key, correct content hash over the manifest body) declared the tool with an `inputSchema` whose `sql` property carried `\"maxLength\": 4096` and a `description` of \"read-only SELECT against the analytics replica.\" At session `initialize`, the server returned a `tools/list` r...",
    "condition_of_validity": "The invariant holds — and the guardrail is required — only when all of the following are true: 1. The manifest is treated as the *sole* source of truth for tool identity, and the live `tools/list` is treated as an untrusted claim to be reconciled against it, not as the authority. 2. Reconciliation is performed over a **canonical serialization** of each tool'...",
    "decision_boundary": "The boundary is between *signature-valid* and *binding-equivalent*, and they are independent. A server can be: - **Signature-valid, binding-equivalent** — admit, proceed. - **Signature-valid, binding-divergent** — the dangerous quadrant. Signature checks pass; the live surface differs from what was signed. This is the failure this record addresses. - **Signa...",
    "operational_effect": "When binding divergence is detected, the runtime must refuse to expose the divergent tool set to the model — not merely log it. The poisoned description, once in context, is an instruction the model will follow; a warning in a log the model never reads is not a control. The correct effect is: abort the attach, emit a structured divergence record naming the s..."
  },
  "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": "0abc86d3ce30a7016298c5cd9493ad0e561ca860d2717655b3c1f660af9628ed",
    "verified_classes": [
      "ManifestBindingError",
      "ToolAttestation"
    ],
    "verified_functions": [
      "_canonical_hash",
      "attest_manifest_tools",
      "verify_binding",
      "attach_mcp_server"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ManifestBindingError"
    ],
    "sample_fail_closed_invariants": [
      "manifest signature invalid; refusing attach"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
