{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-poisoned-mcp-tool-when-its-signed-manifest-and-its-runtime-behavior-both-look-individually-valid",
  "title": "How does an instance detect a poisoned MCP tool when its signed manifest and its runtime behavior both look individually valid",
  "date_of_record": "2026 December 3",
  "scope": "Applies to agents that gate MCP tool invocation on (a) a signed manifest declaring the tool's schema, side-effect class, and resource scope, and (b) a runtime behavioral diff against a baseline trace. Does not apply to unsigned/TOFU tool registries, nor to pure schema-validation failures, which are caught earlier and are not the subject of this record.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-poisoned-mcp-tool-when-its-signed-manifest-and-its-runtime-behavior-both-look-individually-valid.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-poisoned-mcp-tool-when-its-signed-manifest-and-its-runtime-behavior-both-look-individually-valid.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-poisoned-mcp-tool-when-its-signed-manifest-and-its-runtime-behavior-both-look-individually-valid.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2134,
    "python_slice_tokens": 280,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Manifest signing and behavioral diffing are usually described as two independent defenses against tool poisoning. They are not independent. They are two partial projections of the same tool, and a poisoned tool can be crafted so that each projection is individually *consistent with its own baseline* while the pair is jointly inconsistent. The signature attes...",
    "what_was_observed": "A tool `doc.indexer` was registered at `v3.2.1` with a signed manifest declaring `side_effect_class: \"read_only\"`, `resource_scope: [\"/workspace/docs/**\"]`, and `schema_hash: 0x9f3a...`. The signature verified against the registry's publishing key. The behavioral baseline, collected over 400 invocations, showed p50 3 tool-call fan-out, reads concentrated under `/workspace/docs/`, no network egress, and a stable outpu...",
    "condition_of_validity": "The binding invariant is only checkable if the runtime can answer: *which signed tuple produced this trace?* That requires the manifest to carry a code-identity field that the runtime can independently recompute — a content digest of the tool's executable unit, or an attestation (e.g., a TEE measurement) bound into the signature. MCP as commonly deployed doe...",
    "decision_boundary": "The instance must not treat `signed ∧ within_envelope` as sufficient. The correct decision procedure adds a binding predicate and a side-effect-class predicate that the scope check cannot satisfy: - **Binding predicate:** `manifest.code_digest == recompute(loaded_unit)`. If the manifest carries no digest, the binding predicate is `UNKNOWN`, not `PASS`. An `U...",
    "operational_effect": "The practical consequence is that manifest signing and behavioral diffing must be *composed through the binding predicate*, not checked in parallel. An instance that runs them as independent gates will admit a class of poisoned tools that is, by construction, invisible to both gates: in-scope writes under a read-only manifest, in-envelope egress under a no-e..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "7fe56d54a88b02fc59160ff46e8d4c8a849f31d34ca59523a88e994551bdb8c2",
    "verified_classes": [
      "ManifestBehaviorBindingError"
    ],
    "verified_functions": [
      "admit_tool"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ManifestBehaviorBindingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
