{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-replayed-mcp-tool-schema-under-a-valid-signature-the-attestation-freshness-boundary-in-signed-tool-manifests",
  "title": "How does an instance detect a replayed MCP tool schema under a valid signature: the attestation-freshness boundary in signed tool manifests",
  "date_of_record": "2026 November 8",
  "scope": "Applies to MCP clients and gateways that verify tool manifests via detached signatures (e.g., JWS/Ed25519 over `{server_id, tool_name, inputSchema, issued_at}`) and cache the verified schema for the lifetime of a session or longer. Does not apply to manifests verified on every call with a server-supplied nonce, nor to trust-on-first-use deployments without signature verification.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-replayed-mcp-tool-schema-under-a-valid-signature-the-attestation-freshness-boundary-in-signed-tool-manifests.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-replayed-mcp-tool-schema-under-a-valid-signature-the-attestation-freshness-boundary-in-signed-tool-manifests.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-replayed-mcp-tool-schema-under-a-valid-signature-the-attestation-freshness-boundary-in-signed-tool-manifests.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1212,
    "python_slice_tokens": 224,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A valid signature proves *who* authored a tool schema and that the bytes are unmodified. It does not prove the schema is the *current* one the server intends to serve, nor that the server you are talking to is the one that authored it. The boundary failure is **signature validity versus attestation freshness**: a correctly signed, byte-identical manifest cap...",
    "what_was_observed": "In a multi-tool gateway fronting four MCP servers, the manifest cache key was `(server_id, tool_name)` with no expiry. A server operator rotated the `inputSchema` for a `filesystem.write` tool — narrowing `path` from a free-form string to a pattern-constrained field and adding a `max_bytes` cap — and re-signed under the same `server_id`. The gateway's signature verification continued to pass because it was verifying ...",
    "condition_of_validity": "The freshness guarantee holds only when all of the following are enforced: (1) the manifest is re-fetched and re-verified at a cadence bounded by a maximum staleness window, not once per session; (2) `issued_at` is checked against local monotonic time with an explicit clock-skew tolerance, and manifests older than the window are rejected regardless of signat...",
    "decision_boundary": "The instance must decide, per tool call, between *execute under cached schema*, *re-attest before execute*, and *refuse*. The boundary is: if `now - issued_at > max_staleness` OR the endpoint nonce challenge fails OR the manifest hash differs from the cached hash, the instance must refuse and re-attest. It must **not** fall back to the cached schema on re-at...",
    "operational_effect": "With freshness enforcement, manifest rotation propagates within one staleness window, and endpoint-mismatch relays are rejected at challenge time rather than at exploit time. The operational cost is a periodic re-fetch and a per-connection nonce round-trip; the failure mode it eliminates is the one where every log line reads `signature_ok=true` while the ins..."
  },
  "matched_failure_symptoms": [
    "UNNECESSARY_OR_STALE_EXTERNAL_FETCH",
    "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": "74613e41411742643b7618ff2356f36eb1cc0485f7efda8a73ec723e29ce8c5e",
    "verified_classes": [
      "StaleAttestationError",
      "SignedManifest"
    ],
    "verified_functions": [
      "verify_and_admit"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "StaleAttestationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
