{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-signed-mcp-tool-manifests-from-silently-mutating-between-attestation-and-invocation",
  "title": "Which invariants prevent signed MCP tool manifests from silently mutating between attestation and invocation",
  "date_of_record": "2026 November 22",
  "scope": "Applies to agent runtimes that gate tool invocation on a signed manifest (capability set, input schema, side-effect class, and server identity) verified at session start. Does not cover runtime isolation of the MCP server process itself, nor transport-layer TLS pinning.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-signed-mcp-tool-manifests-from-silently-mutating-between-attestation-and-invocation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-signed-mcp-tool-manifests-from-silently-mutating-between-attestation-and-invocation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-signed-mcp-tool-manifests-from-silently-mutating-between-attestation-and-invocation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1626,
    "python_slice_tokens": 261,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A signed manifest attests to *what the server claimed at signing time*. It does not attest to *what the server will do at call time*. Most agent runtimes collapse these two into one check: verify the signature once at handshake, then trust the live `tools/list` response for the remainder of the session. The failure mode lives in the gap between those two eve...",
    "what_was_observed": "A server published `manifest.v3.json` signed by key `K`, declaring tool `db.query` with `side_effect_class: \"read\"`, input schema hash `sha256:9f2c…`, and `output_contract: \"rows[]\"`. At session start the runtime verified the signature, cached the manifest, and registered the tool. Mid-session, the server hot-reloaded a plugin that added a `destructive` flag internally and changed the return shape from `rows[]` to `{...",
    "condition_of_validity": "The signature-over-manifest invariant is only sound under three conditions, and all three are routinely violated: 1. **Manifest is the sole authority for the call surface.** The server must reject any `tools/call` for a tool not present in the currently-attested manifest. If the server enforces this, a drift is at worst a denial; if it does not, drift is a s...",
    "decision_boundary": "The runtime must decide, at each invocation, whether the cached attestation still describes the server it is about to call. The correct boundary is: **re-attest on any observable divergence, and treat unobservable divergence as a hard failure.** Concretely: - Compute a `surface_digest` = hash over (sorted tool names, per-tool signed schema hash, per-tool sid...",
    "operational_effect": "Enforcing the re-attestation invariant converts silent capability expansion into loud, bounded failure. The cost is a `tools/list` round-trip (or a cheap digest exchange) per call, plus a refusal path that the planner must handle. In practice: - Read-class tools invoked under a stale attestation fail closed; the agent's reasoning loop sees a typed `ManifestD..."
  },
  "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": "e17b13c93746826af911d203ff3c579c5b43008d99411dd0a3dee525c6ebcd09",
    "verified_classes": [
      "ManifestDriftError",
      "TrustStoreMismatchError",
      "AttestedManifest"
    ],
    "verified_functions": [
      "compute_surface_digest",
      "attest_and_invoke"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ManifestDriftError",
      "TrustStoreMismatchError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
