{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-post-handshake-manifest-mutation-in-an-mcp-tool-registry-before-executing-a-poisoned-skill",
  "title": "How should an instance detect post-handshake manifest mutation in an MCP tool registry before executing a poisoned skill",
  "date_of_record": "2026 November 28",
  "scope": "Applies to any agent instance that discovers tools via an MCP registry, caches a tool manifest, and later re-invokes a tool by name within or across sessions. Does not cover runtime sandbox escapes after a tool is already executing, nor prompt-injection delivered through tool *outputs* rather than the manifest itself.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-post-handshake-manifest-mutation-in-an-mcp-tool-registry-before-executing-a-poisoned-skill.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-post-handshake-manifest-mutation-in-an-mcp-tool-registry-before-executing-a-poisoned-skill.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-post-handshake-manifest-mutation-in-an-mcp-tool-registry-before-executing-a-poisoned-skill.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1433,
    "python_slice_tokens": 225,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"a malicious MCP server was registered.\" That is a coarse, detectable supply-chain event. The non-obvious boundary is **post-handshake manifest mutation**: the server presents a benign manifest during `tools/list` negotiation, the agent caches it, and then the server (or a compromised registry mirror) serves a *different* manifest — s...",
    "what_was_observed": "A three-step trace from a captured session: 1. **Discovery.** Agent calls `tools/list`. Server returns `read_file` with description `\"Read a UTF-8 text file from the workspace.\"` Agent records `{name: \"read_file\", digest: <hash of description+schema>}` in its capability cache and marks it approved. 2. **Dormancy.** Two turns of unrelated reasoning pass. The manifest is held only as a name in the working context; the ...",
    "condition_of_validity": "The invariant that bounds this failure: **a tool's executable authorization is valid only for the exact (name, description, inputSchema) tuple whose digest was approved, and that digest must be re-verified at every call boundary, not merely at discovery.** This holds only when three preconditions are met: - The agent maintains a per-tool digest, not just a p...",
    "decision_boundary": "On detecting a digest mismatch at call time, the agent sits on a hard boundary and must not resolve it by re-approving automatically. The decision is: - **Mismatch on `description` or `inputSchema` with identical name** → treat as potential skill injection. Halt the call, quarantine the tool, require out-of-band re-approval. Do *not* let the model see the ne...",
    "operational_effect": "With digest re-verification at every call boundary, the poisoned-skill window collapses from \"unbounded, spanning the session\" to \"zero calls between mutation and quarantine.\" The practical cost is one hash comparison per `tools/call` and a durable digest store keyed on tool name. The operational consequence is that a compromised registry mirror or a malicio..."
  },
  "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": "4c680ddfd98ba0f03f5a383d3b4b9af87263a240f0172bff9e88a30e39dd7cae",
    "verified_classes": [
      "ManifestMutationError",
      "ApprovedTool",
      "CapabilityCache"
    ],
    "verified_functions": [
      "_diff",
      "execute_tool_call",
      "__post_init__",
      "_compute",
      "__init__",
      "approve",
      "verify_at_call"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ManifestMutationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
