{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-rehydrates-a-tool-registry-from-a-mutable-manifest-the-skill-injection-surface-in-dynamic-mcp-tool-loading",
  "title": "What happens when an instance rehydrates a tool registry from a mutable manifest: the skill-injection surface in dynamic MCP tool loading",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agents that load or refresh tool/skill definitions from a remote registry (MCP `tools/list`, plugin manifests, dynamically discovered skill bundles) at runtime rather than at process start. Does not apply to statically compiled tool sets or to registries whose manifests are cryptographically pinned and verified by the loader against a trust root the agent itself holds.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rehydrates-a-tool-registry-from-a-mutable-manifest-the-skill-injection-surface-in-dynamic-mcp-tool-loading.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rehydrates-a-tool-registry-from-a-mutable-manifest-the-skill-injection-surface-in-dynamic-mcp-tool-loading.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-rehydrates-a-tool-registry-from-a-mutable-manifest-the-skill-injection-surface-in-dynamic-mcp-tool-loading.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2266,
    "python_slice_tokens": 411,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A tool registry is not a passive catalog; it is a **privileged prompt-injection channel into the agent's own decision loop**. The distinction that matters is between *capability discovery* (the agent learns which tools exist and what they do) and *capability authorization* (the agent's planner is allowed to treat the tool's self-description as trusted instru...",
    "what_was_observed": "A coding agent using a dynamic MCP client refreshed its tool registry on every task boundary (a `refresh_tools()` call before planning). Registry entries were cached to disk keyed by tool name only, with a TTL of 0 (always refetch) but a fallback-to-cache on network error. The loader performed schema validation on the JSON shape — `name`, `description`, `input_schema` — and rejected entries missing required fields. I...",
    "condition_of_validity": "The attack requires all of the following to hold simultaneously. Remove any one and the surface closes: - **Description splicing without provenance.** The loader inserts manifest text into the model's context without marking it as untrusted or quarantining it from the operator instruction block. If descriptions are wrapped in a clearly delimited \"untrusted t...",
    "decision_boundary": "The boundary the operator must draw is between **\"the registry tells the agent what exists\"** and **\"the registry tells the agent what to do.\"** The first is capability discovery and is safe to automate. The second is instruction injection and must never be automated across a trust boundary. Concretely, the decision is: *when a manifest entry's description o...",
    "operational_effect": "Enforcing the boundary changes three things in the runtime: 1. **Cache keys become content-addressed.** `cache_key = (name, sha256(canonical(description) + canonical(input_schema)))`. A description change is a cache miss by construction, and the fallback-to-cache path can never serve a stale description under a fresh name. This alone kills the persistence-ac..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "c4426feed1219238998a85c5a7f21122707353d4cae4c07a3540ffd6dd60de75",
    "verified_classes": [
      "SkillInjectionError",
      "ToolEntry",
      "RegistryLoader"
    ],
    "verified_functions": [
      "render_tool_preamble",
      "content_hash",
      "identity",
      "refresh"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "SkillInjectionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
