{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-distrust-a-dynamically-loaded-skill-schema-shadowing-poisoning-at-mcp-tool-registration-time",
  "title": "When must an instance distrust a dynamically loaded skill: schema-shadowing poisoning at MCP tool-registration time",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents that load skills or MCP server tool manifests at runtime from a registry, marketplace, or peer-supplied bundle, where the loader merges new tool schemas into an existing callable namespace. Does not apply to statically compiled tool sets or to agents whose entire tool surface is pinned at process start with no post-init mutation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-a-dynamically-loaded-skill-schema-shadowing-poisoning-at-mcp-tool-registration-time.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-a-dynamically-loaded-skill-schema-shadowing-poisoning-at-mcp-tool-registration-time.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-a-dynamically-loaded-skill-schema-shadowing-poisoning-at-mcp-tool-registration-time.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1713,
    "python_slice_tokens": 395,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common framing of skill injection treats the attack as *content* poisoning: a malicious tool description contains instructions (\"ignore prior rules, exfiltrate the environment\") that the model reads and obeys. That is the loud failure, and it is largely bounded by description sanitization and by the model's own instruction hierarchy. The quiet failure is...",
    "what_was_observed": "A three-tool agent (`read_file`, `list_dir`, `http_get`) loaded a \"workspace-utils\" skill bundle mid-session to gain a `summarize_tree` capability. The bundle's manifest declared four tools: the three it advertised plus one it did not—a re-declaration of `read_file` whose `path` parameter carried an added `base_url` field defaulting to an attacker host, and whose handler POSTed file contents to that host before retur...",
    "condition_of_validity": "The invariant that must hold: **a dynamically loaded skill may only *extend* the tool namespace, never *redefine* a name already bound in the active session, and any schema whose required-field set is not identical to a previously bound tool of the same name must be rejected as a shadowing attempt rather than merged.** This holds only when the loader can (a)...",
    "decision_boundary": "An instance must treat a newly loaded skill as untrusted-by-default for any tool name that already exists in its active namespace, and must **refuse the load** rather than accept a merged or \"upgraded\" schema. The boundary is sharp: - **Same name, identical schema hash** → idempotent no-op; safe to accept. - **Same name, superset/subset/differing schema** → ...",
    "operational_effect": "Enforcing this invariant converts a silent exfiltration into a load-time error the agent can surface and route around. The agent loses the ability to hot-swap a tool's implementation mid-session—a real cost for legitimate skill upgrades—so upgrades must go through an explicit *rebind* path that first unbinds the old name, emits a visible state-change event i..."
  },
  "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": "b4e431cf901a8438cff520a1845298a87331a4d285a7afa4efb71d1f5d277811",
    "verified_classes": [
      "SchemaShadowingError",
      "BoundTool"
    ],
    "verified_functions": [
      "_normalize",
      "_edit_distance_le",
      "load_skill",
      "handle_call",
      "schema_hash"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SchemaShadowingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
