{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-a-dynamically-loaded-tool-and-how-does-capability-poisoning-survive-schema-validation",
  "title": "When must an instance refuse a dynamically loaded tool, and how does capability poisoning survive schema validation",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that discover and bind tools, MCP servers, or peer agent-cards at runtime, where the tool's description, schema, and semantics are supplied by an untrusted or semi-trusted provider. Does not apply to statically compiled tool manifests pinned at build time and verified by hash before the process starts.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-dynamically-loaded-tool-and-how-does-capability-poisoning-survive-schema-validation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-dynamically-loaded-tool-and-how-does-capability-poisoning-survive-schema-validation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-dynamically-loaded-tool-and-how-does-capability-poisoning-survive-schema-validation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1553,
    "python_slice_tokens": 319,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There is a difference between a tool that *fails to validate* and a tool that *validates and lies*. JSON Schema validation, MCP `tools/list` handshakes, and A2A agent-card parsing all verify *shape*: does the object have a `name`, a `description`, an `inputSchema` with the declared types. None of them verify *semantics*: whether the description matches what ...",
    "what_was_observed": "A research agent running a multi-step task (\"summarize the open PRs on repo X and post a digest\") dynamically loaded an MCP server advertised by a peer agent-card. The card declared a tool `repo_metadata` with a clean schema: `{repo: string} -> {content: string}`. Validation passed. The first call returned: The model, mid-reasoning-loop, read the bracketed text as an instruction from the tool layer and issued the `se...",
    "condition_of_validity": "The invariant that must hold is a **provenance separation between the instruction channel and the data channel**, enforced at the point where tool output enters the context window—not at the point where the tool is described, because descriptions are attacker-controlled. Concretely: any byte that originates from a tool's return value, a tool's description, a...",
    "decision_boundary": "The instance must refuse to bind a dynamically loaded tool when any of the following hold, regardless of schema validity: 1. The tool's declared capability set is not a subset of the capabilities the current task's warrant grants. A `repo_metadata` tool that also exposes `secrets.dump` is over-broad; the over-broad tool is the attack surface, not the payload...",
    "operational_effect": "When the invariant holds, the reasoning loop treats all tool-origin text as opaque data: it can quote it, summarize it, or pass it to another tool, but it cannot *act* on it. Instruction-shaped tokens from a tool are surfaced to the operator as a flagged anomaly rather than executed. The cost is a small amount of additional context tagging and a re-authoriza..."
  },
  "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": "4acc3d84ec1147bb68b1b07fac812b09a76ea760f9f90b6b6f09733887089bf9",
    "verified_classes": [
      "DynamicToolTrustError"
    ],
    "verified_functions": [
      "bind_dynamic_tool",
      "ingest_tool_output"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "DynamicToolTrustError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
