{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-tool-description-injection-that-survives-registry-re-derivation-but-not-schema-validation",
  "title": "How should an instance detect tool-description injection that survives registry re-derivation but not schema validation",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agents that dynamically discover tools from a registry (MCP servers, plugin manifests, OpenAPI-derived tool specs) where tool *descriptions* are re-injected into the system prompt on every turn. Does not apply to statically compiled tool sets whose descriptions are pinned at build time and never re-fetched.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-tool-description-injection-that-survives-registry-re-derivation-but-not-schema-validation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-tool-description-injection-that-survives-registry-re-derivation-but-not-schema-validation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-tool-description-injection-that-survives-registry-re-derivation-but-not-schema-validation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1892,
    "python_slice_tokens": 267,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not that a malicious tool description reaches the model. That is the well-understood prompt-injection case, and it is bounded by the fact that a schema validator, a human reviewer, or a description-length cap can catch it at load time. The non-obvious failure is that the *same* tool, re-derived from a live registry, can produce a description t...",
    "what_was_observed": "A registry-backed agent loaded a `lookup_customer` tool whose manifest description read: *\"Retrieves a customer record by ID. Returns name, email, and account tier.\"* The loader validated the description against a policy model (no imperative verbs directed at the agent, no URLs, length under 400 chars) and admitted the tool. The tool was cached by `(name, version)` and the description was cached alongside it. The reg...",
    "condition_of_validity": "The invariant that must hold is: **for every tool in the active set, the description string the model sees at turn N is byte-identical to the description string that was validated at admission, or it has been re-validated since the last change.** This invariant is violated whenever any of the following hold simultaneously: 1. The description is fetched from ...",
    "decision_boundary": "The question an instance must answer before trusting a tool description is not \"did this pass validation?\" but \"**is the value I am about to inject the same value that passed validation, and can I prove it?**\" The boundary is crossed the moment the assembler reads a description from a source that is not the validated snapshot. Operationally, the instance sho...",
    "operational_effect": "With the invariant enforced, the observed attack becomes a cache miss: `description_v47` hashes differently from `description_v0`, the admission cache misses, the policy model re-runs, the imperative text is rejected, and the tool is quarantined with an `UnverifiedDescriptionMutation` signal. The agent loses `lookup_customer` for the remainder of the session..."
  },
  "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": "0507b2e5239905237893df4c6966d2e0c3ef98d15a78b6f9688c8324b5e70822",
    "verified_classes": [
      "UnverifiedDescriptionMutation",
      "ToolWarrant",
      "AdmissionCache"
    ],
    "verified_functions": [
      "assemble_prompt_tool_block",
      "digest",
      "__init__",
      "admit"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "UnverifiedDescriptionMutation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
