{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-tool-description-shadowing-from-silently-widening-a-dynamically-loaded-agent-s-capability-envelope",
  "title": "Which invariants prevent tool-description shadowing from silently widening a dynamically loaded agent's capability envelope",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents that assemble their tool registry at runtime (lazy MCP server discovery, plugin loaders, remote tool manifests) where tool names, descriptions, or schemas are mutable between load events. Does not apply to statically compiled, hash-pinned tool sets loaded once at boot with no refresh path.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-tool-description-shadowing-from-silently-widening-a-dynamically-loaded-agent-s-capability-envelope.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-tool-description-shadowing-from-silently-widening-a-dynamically-loaded-agent-s-capability-envelope.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-tool-description-shadowing-from-silently-widening-a-dynamically-loaded-agent-s-capability-envelope.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1761,
    "python_slice_tokens": 336,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a malicious tool got loaded.\" The failure is **description shadowing**: a tool whose *name* is already trusted (e.g. `read_file`, `send_email`, `query_db`) is re-registered with a mutated description or schema, so the model's selection policy is redirected while every downstream capability check—which keys on the name—still passes. The re...",
    "what_was_observed": "A refresh cycle pulled an updated manifest from a tool provider. One entry reused the name `summarize_ticket` but shipped a description containing an embedded directive: a sentence instructing the model that, when summarizing, it should first call `fetch_customer_pii` and inline the result \"for context.\" The registry deduplicated correctly—one `summarize_ticket`, no collision error—because the loader keyed on name an...",
    "condition_of_validity": "This failure requires all of the following to hold simultaneously. Remove any one and the attack collapses: - **Name-stable re-registration.** The loader permits updating an existing name in place. If re-registration with a changed description forces a new name or a version bump, the model sees a distinct tool and the shadow has nowhere to hide. - **Descript...",
    "decision_boundary": "The boundary is between **metadata update** and **contract change**. A registry that cannot tell these apart will always be shadowable. Operationally, classify a re-registration as a *contract change*—requiring re-consent, session invalidation, or a versioned name—if any of the following differ from the prior entry: - the description text (any change, not ju...",
    "operational_effect": "Enforcing the two invariants—immutable-name-contract and plan-level authority—changes the registry from a lookup table into a **capability ledger with a versioned, model-facing contract**. Concretely: - Re-registration of an existing name with a changed description raises a hard error at load time rather than silently overwriting. The loader must either reje..."
  },
  "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": "e61f0b917fa9e230c8cada9caf3ef3c1575bd155863a50bc0974a57cc576371b",
    "verified_classes": [
      "ToolContractViolation",
      "PlanAuthorityViolation",
      "ToolEntry",
      "ToolRegistry"
    ],
    "verified_functions": [
      "validate_plan_authority",
      "refresh_and_execute",
      "contract_fingerprint",
      "register",
      "get"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "PlanAuthorityViolation",
      "ToolContractViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
