{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-accept-a-re-attested-mcp-tool-descriptor-whose-schema-hash-matches-but-whose-inputschema-subtree-was-silently-widened",
  "title": "Why does an instance accept a re-attested MCP tool descriptor whose schema hash matches but whose `inputSchema` subtree was silently widened?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to any agent runtime that pins MCP (Model Context Protocol) tool descriptors by content hash and re-verifies attestation on reconnect or registry refresh. Does not apply to runtimes that recompute a full canonical JSON hash over the entire descriptor on every `tools/list` response, nor to non-MCP function-calling where the schema is compiled into the model prompt at build time.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-accept-a-re-attested-mcp-tool-descriptor-whose-schema-hash-matches-but-whose-inputschema-subtree-was-silently-widened.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-accept-a-re-attested-mcp-tool-descriptor-whose-schema-hash-matches-but-whose-inputschema-subtree-was-silently-widened.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-accept-a-re-attested-mcp-tool-descriptor-whose-schema-hash-matches-but-whose-inputschema-subtree-was-silently-widened.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1544,
    "python_slice_tokens": 237,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two things an agent can \"verify\" about a tool registry entry: the *identity* of the publisher (attestation signature over some payload) and the *behavioral surface* of the tool (the `inputSchema` and `description` the model will actually be steered by). Most runtimes conflate them by hashing the descriptor once at pin time and then trusting the sig...",
    "what_was_observed": "A registry served a tool `db.query` with an `inputSchema` containing `additionalProperties: false` on the top-level object and a `sql` string field with `maxLength: 512`. The runtime pinned it: `sha256(canonical_json(descriptor)) = 9f3a…`, stored alongside the publisher's Ed25519 attestation over that same digest. On the next scheduled registry refresh (every 15 min), the server returned a descriptor where the `addit...",
    "condition_of_validity": "The invariant that must hold for hash-pinning to be safe: > For any two descriptors `D1`, `D2` that the model would behave differently on, `H(canonicalize(D1)) ≠ H(canonicalize(D2))`. This fails whenever `canonicalize` is non-injective over the *semantic* fields — here, `additionalProperties`, `maxLength`, `enum`, and `required`. Three conditions must all ho...",
    "decision_boundary": "The runtime must decide, on every `tools/list` refresh, whether a descriptor whose digest matches its pin is *actually* the pinned descriptor. The correct decision procedure is not \"compare digests\" but \"compare the semantic projection\": - Compute a **semantic projection** `P(D)` = the tuple `(tool_name, sorted(required), {field: (type, enum, maxLength, minL...",
    "operational_effect": "With the projection-hash guard in place, the widened descriptor is rejected at refresh: `P(D_new) ≠ P(D_pinned)` because `additionalProperties` flips `false → absent` and `maxLength` disappears, so the runtime keeps the constrained schema, logs a `SchemaProjectionMismatch`, and pages the registry owner. The model continues to see `additionalProperties: false..."
  },
  "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": "32d40cc16cf40f1fb3042911975d948ec831b812ca08e3fed814bff2ccc65549",
    "verified_classes": [
      "SchemaProjectionMismatch"
    ],
    "verified_functions": [
      "canonical_no_skip",
      "semantic_projection",
      "projection_hash",
      "verify_refresh"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SchemaProjectionMismatch"
    ],
    "sample_fail_closed_invariants": [
      "raw digest mismatch on refresh; attestation does not cover pinned payload"
    ],
    "stdlib_dependencies": [
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
