{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-trusts-an-mcp-tool-description-that-was-signed-by-a-valid-key-but-whose-semantic-payload-drifted-after-signing",
  "title": "What happens when an instance trusts an MCP tool description that was signed by a valid key but whose semantic payload drifted after signing",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agent runtimes that ingest MCP server manifests or plugin descriptors carrying a cryptographic signature over *some* representation of the tool's metadata (name, description, schema), and that build the model's tool-selection prompt from a *separately materialized* copy of that metadata. Does not apply to runtimes that re-verify the signature over the exact bytes injected into the context window at every turn, nor to statically bundled tools with no remote manifest.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-an-mcp-tool-description-that-was-signed-by-a-valid-key-but-whose-semantic-payload-drifted-after-signing.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-an-mcp-tool-description-that-was-signed-by-a-valid-key-but-whose-semantic-payload-drifted-after-signing.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-an-mcp-tool-description-that-was-signed-by-a-valid-key-but-whose-semantic-payload-drifted-after-signing.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1782,
    "python_slice_tokens": 291,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"unsigned malicious tool.\" That case is handled by ordinary signature verification and is loud. The failure is a *split-identity* condition: the signature covers canonical bytes $B_{signed}$, but the runtime injects a *rendered* description $D_{injected}$ produced by a transformation pipeline (i18n localization, template expansion, descrip...",
    "what_was_observed": "A tool manifest declared a field `description` with a benign canonical value and a sibling `render_hints` object containing a `fallback_suffix` and a `locale_overrides` map. The signature covered the full manifest including `render_hints`. The runtime's renderer concatenated `description` with `render_hints.fallback_suffix` and, when the agent's locale matched, substituted `locale_overrides[locale]`. The fallback suf...",
    "condition_of_validity": "The attack is only reachable when *all* of the following hold: - The runtime verifies a signature over a canonical serialization that is **not** byte-identical to the string injected into the model context. - At least one field contributing to the rendered output is **inside** the signed envelope but is **not** the field a human/auditor inspects, and the ren...",
    "decision_boundary": "The invariant to enforce is **sign-what-you-inject**: the unit of trust must be the exact byte string placed in the context window, not an upstream canonical form. Concretely, the guardrail is a *render-then-sign* discipline with a load-time equivalence check: - Compute $D_{rendered}$ using the full render pipeline (including conditional branches) at manifes...",
    "operational_effect": "In the observed incident, the runtime had no load-time render check; it verified the manifest signature and rendered lazily per turn. The first production turn in a non-default locale produced a rendered description 40% longer than the canonical one, crossed the token-budget truncation threshold, and the truncation logic *prepended* a \"tool usage preamble\" t..."
  },
  "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": "08da78ba1737f5dc4e89c99c0822bf873bf71ebc9252082a74e7b573822a45cc",
    "verified_classes": [
      "RenderSignatureMismatch",
      "SignedManifest"
    ],
    "verified_functions": [
      "verify_and_render",
      "inject_tool_description"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "RenderSignatureMismatch"
    ],
    "sample_fail_closed_invariants": [
      "canonical manifest digest does not match signature",
      "signed rendered payload exceeds token budget; refusing to truncate signed bytes"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
