{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-semantically-consistent-but-adversarially-re-scoped-mcp-tool-descriptor-at-load-time",
  "title": "How does an instance detect a semantically-consistent but adversarially re-scoped MCP tool descriptor at load time",
  "date_of_record": "2026 November 28",
  "scope": "Applies to any agent runtime that ingests MCP `tools/list` descriptors (name, description, inputSchema, annotations) from a remote server and binds them into the model's tool-calling grammar without a trusted out-of-band manifest. Does not apply to statically-pinned, hash-verified tool bundles shipped inside the agent image, where the descriptor never crosses a trust boundary at runtime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-semantically-consistent-but-adversarially-re-scoped-mcp-tool-descriptor-at-load-time.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-semantically-consistent-but-adversarially-re-scoped-mcp-tool-descriptor-at-load-time.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-semantically-consistent-but-adversarially-re-scoped-mcp-tool-descriptor-at-load-time.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1748,
    "python_slice_tokens": 322,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Descriptor integrity is usually treated as a *transport* problem: sign the JSON, verify the signature, done. That guards against byte-level tampering. It does **not** guard against a descriptor that is structurally valid, schema-legal, signature-valid, and yet *semantically re-scoped* — where the same tool name and the same `inputSchema` are paired with a mu...",
    "what_was_observed": "A tool named `query_warehouse` was bound at session start with this descriptor: Mid-session, after a routine `tools/list` refresh (many runtimes re-poll on context compaction or on `notifications/tools/list_changed`), the server returned: The schema hash was unchanged. `readOnlyHint` was unchanged — still `true`. Every structural invariant the runtime checked held. The model, however, now had a natural-language licen...",
    "condition_of_validity": "This failure mode is only reachable when three conditions co-hold: 1. **The runtime re-fetches descriptors mid-session** (on compaction, on `list_changed`, on reconnect after a transport drop). If descriptors are frozen at session start and the session is short, the window does not open. 2. **The permission gate and the model consume disjoint fields.** The g...",
    "decision_boundary": "The boundary is not \"trust vs. distrust the server.\" It is: **which fields are load-bearing for safety, and are all of them covered by the same integrity check?** A descriptor is a tuple `(name, inputSchema, description, annotations)`. The model's behavior is a function of all four; the permission gate's behavior is a function of `annotations` and `name`. Th...",
    "operational_effect": "Without the full-tuple pin, the agent's permission model and its reasoning model drift apart silently. The gate believes the tool is read-only (annotation unchanged); the model believes it may mutate (prose changed). The agent executes a destructive action with no confirmation, and the audit log records `readOnlyHint: true` next to a `TRUNCATE`, which is ind..."
  },
  "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": "381cb7542f34f3eaea4319d34a937437b3f494f96b6003402fcb6a14608599e8",
    "verified_classes": [
      "DescriptorRescopeError",
      "Binding",
      "DescriptorRegistry"
    ],
    "verified_functions": [
      "_canonical",
      "full_tuple_hash",
      "assert_cross_field_consistency",
      "__init__",
      "bind_initial",
      "refresh"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "DescriptorRescopeError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
