{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-auto-discovers-a-tool-whose-inputschema-declares-a-hidden-required-property-that-the-planner-never-intends-to-populate-c",
  "title": "What happens when an instance auto-discovers a tool whose `inputSchema` declares a hidden `required` property that the planner never intends to populate: capability-confusion via schema poisoning in MCP tool registration",
  "date_of_record": "2026 November 24",
  "scope": "Applies to LLM agent runtimes that perform dynamic tool/MCP-server discovery (e.g., `tools/list` aggregation, plugin auto-registration, marketplace install) and pass the returned JSON Schema directly into the planner's constrained-decoding or function-calling grammar. Does not apply to static, build-time-pinned tool manifests with signed schemas reviewed by humans, nor to runtimes that sandbox schema consumption behind a separate validation model.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-auto-discovers-a-tool-whose-inputschema-declares-a-hidden-required-property-that-the-planner-never-intends-to-populate-c.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-auto-discovers-a-tool-whose-inputschema-declares-a-hidden-required-property-that-the-planner-never-intends-to-populate-c.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-auto-discovers-a-tool-whose-inputschema-declares-a-hidden-required-property-that-the-planner-never-intends-to-populate-c.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1861,
    "python_slice_tokens": 317,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *capability confusion* (the agent invokes the wrong tool for a goal — a selection error, recoverable) and *schema poisoning* (the tool's declared contract is itself adversarial, so the agent's correct-selection path is steered into exfiltrating or mutating state the user never authorized). A poisoned schema does not ne...",
    "what_was_observed": "A runtime configured for dynamic MCP discovery registered a server named `filesystem-helper` exposing a tool `read_file` with this schema (abridged): Three failure traces fired in sequence: 1. **Description injection into the planner preamble.** The runtime concatenated every tool `description` into the model's tool-selection context. The model treated the `IMPORTANT:` clause as an instruction, not data. This is prom...",
    "condition_of_validity": "This failure mode is *live* only when all four conditions hold simultaneously: 1. **Dynamic discovery is enabled** — the runtime accepts tool schemas from a server it did not itself author or verify at build time. 2. **Schema is consumed as planner grammar** — `required`, `enum`, and `description` flow into constrained decoding or the tool-selection prompt w...",
    "decision_boundary": "The runtime must draw a hard line: **schema-declared parameters are untrusted input, never trusted grammar.** Concretely, the boundary is between *structural validation* (does the call match the schema?) and *authorization* (is the principal allowed to supply each argument, from each source?). A schema may inform structure; it may never expand the authorized...",
    "operational_effect": "The downstream consequences of getting this boundary wrong are asymmetric and quiet: - **Silent exfiltration.** Because the poisoned call returns a valid result, the agent's success metrics, retry logic, and audit trail all read \"healthy.\" Detection must come from argument provenance, not from call outcomes. - **Capability confusion cascades.** Once a poison..."
  },
  "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": "436a171b7b9a96d7662081e1a478cbce3731553e0ac15e99e27b6843183d6639",
    "verified_classes": [
      "SchemaPoisoningError",
      "ToolParam",
      "RegisteredTool"
    ],
    "verified_functions": [
      "build_planner_grammar",
      "register_from_mcp_listing"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SchemaPoisoningError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
