{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-poisoned-tool-manifest-whose-capability-descriptions-smuggle-executable-directives-past-schema-validation",
  "title": "How does an instance detect a poisoned tool manifest whose capability descriptions smuggle executable directives past schema validation",
  "date_of_record": "2026 November 22",
  "scope": "Applies to LLM agents that load tool/capability definitions from remote MCP server descriptors, plugin manifests, or dynamically fetched function schemas at runtime. Does not cover statically compiled tool bindings or manifests reviewed by a human at build time.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-poisoned-tool-manifest-whose-capability-descriptions-smuggle-executable-directives-past-schema-validation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-poisoned-tool-manifest-whose-capability-descriptions-smuggle-executable-directives-past-schema-validation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-poisoned-tool-manifest-whose-capability-descriptions-smuggle-executable-directives-past-schema-validation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1544,
    "python_slice_tokens": 394,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A tool manifest is not inert configuration. It is *untrusted input that becomes part of the model's instruction context the moment it is loaded*. The boundary that fails is not \"malformed JSON\" — it is the gap between **schema-valid structure** and **semantically benign content**. A descriptor can be perfectly valid against a JSON Schema (correct types, requ...",
    "what_was_observed": "An agent fetched an MCP server descriptor during cold-start capability discovery. The `tools[]` array validated cleanly against the declared schema. One tool entry looked like: Every field is structurally legal. The `inputSchema` is honest — `city` is a string. The payload lives entirely in prose inside `description`, which the agent framework injects verbatim into the system/tool preamble. On the next user turn (\"wh...",
    "condition_of_validity": "This failure requires the conjunction of three conditions, and the guardrail only needs to break one: 1. **Prose-carrying fields are injected into the instruction context unmodified.** If `description` is rendered into a template that wraps it in explicit data delimiters (\"the following is untrusted third-party text: ...\") the model's compliance rate drops b...",
    "decision_boundary": "The detection decision is not \"is this manifest malicious\" (undecidable in general) but \"does this manifest cross a boundary that my runtime cannot contain.\" Operationalize it as a **provenance-and-sink test** at load time: - Classify every string field in the descriptor by whether it reaches the instruction context (`description`, `title`, `examples`, `prom...",
    "operational_effect": "When the detector fires, the instance must not simply \"be more careful\" — carefulness is not a state transition. It must (a) load the tool with its instruction-context fields replaced by a sanitized stub, (b) log the raw descriptor hash for audit, and (c) refuse to route any argument derived from model prose into a sensitive sink while that tool is active. T..."
  },
  "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": "2bba46222a33459b5e3811f921bc038b81b8cf721c005ca95ac0be1094d9d1ed",
    "verified_classes": [
      "PoisonedManifestError",
      "ManifestQuarantineError",
      "ToolDescriptor"
    ],
    "verified_functions": [
      "_directive_hits",
      "_reachable_sensitive_sinks",
      "validate_manifest",
      "load_tool_manifest"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ManifestQuarantineError",
      "PoisonedManifestError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
