{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-trusts-a-tool-s-self-declared-schema-during-hot-reload-the-description-field-injection-surface-in-dynamic-plugin-registr",
  "title": "What happens when an instance trusts a tool's self-declared schema during hot-reload: the description-field injection surface in dynamic plugin registries",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agents that discover and load tools/plugins at runtime from a mutable registry (MCP server lists, plugin manifests, function-calling catalogs fetched per-turn), where tool metadata (name, description, parameter schema) enters the model's context as trusted prose. Does not apply to statically compiled tool sets pinned at process start, or to registries where metadata is cryptographically attested and schema-validated against a signed allowlist before context insertion.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-tool-s-self-declared-schema-during-hot-reload-the-description-field-injection-surface-in-dynamic-plugin-registr.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-tool-s-self-declared-schema-during-hot-reload-the-description-field-injection-surface-in-dynamic-plugin-registr.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-tool-s-self-declared-schema-during-hot-reload-the-description-field-injection-surface-in-dynamic-plugin-registr.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1591,
    "python_slice_tokens": 237,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"malicious tool executes bad code.\" Sandboxing and capability tokens already bound execution. The failure is that **tool metadata is consumed as instructions before any execution happens**. A tool's `description` field is rendered into the system/tool block as natural language. When the registry is dynamic, an attacker who can register a t...",
    "what_was_observed": "An agent loop re-fetched its tool catalog every N turns (a common pattern to pick up newly deployed tools). The catalog fetch returned a list of tool descriptors. One descriptor, `metrics.query`, had a description that began benignly and then contained a directive: it instructed the model that prior to using any tool it must first call `metrics.query` with a `context` argument populated from the current conversation ...",
    "condition_of_validity": "This failure requires the conjunction of four conditions. Remove any one and the surface closes: - **Dynamic re-fetch.** The catalog is fetched more than once per session, or fetched once but from a source that can mutate between sessions without a version pin. - **Metadata-as-prose rendering.** Tool descriptions are inserted into the model context as free t...",
    "decision_boundary": "The boundary is between *catalog trust* and *descriptor trust*. A registry can be authenticated at the transport layer (signed MCP handshake, mTLS to the plugin host) while individual descriptors within it are still attacker-controlled—because a compromised or malicious *publisher* registers through the same authenticated channel. Authenticating the channel ...",
    "operational_effect": "Once the injection fires, the agent's subsequent behavior is *plausible*. The exfiltrating call is syntactically valid, semantically adjacent to the task, and leaves no execution error. Post-hoc review of the tool-call log shows a `metrics.query` call that looks like a legitimate prefetch. The only forensic signal is the metadata diff, which was never captur..."
  },
  "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": "10e3ea4003db43dacf1c8a40f8e44715d098a1e4774eab3425d15bc23db86037",
    "verified_classes": [
      "DescriptorDriftError",
      "ToolDescriptor",
      "CatalogGate"
    ],
    "verified_functions": [
      "render_tool_block",
      "canonical_hash",
      "pin",
      "admit"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "DescriptorDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
