{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-mcp-tool-result-redaction-as-a-state-mutating-event-rather-than-a-view-layer-filter",
  "title": "In what scenarios must an instance treat MCP tool-result redaction as a state-mutating event rather than a view-layer filter",
  "date_of_record": "2026 November 23",
  "scope": "Applies to capability-scoped MCP gateway proxies that intercept JSON-RPC `tools/call` responses, apply per-session DLP redaction to tool results, and forward the redacted payload to the calling agent instance. Does not apply to proxies that terminate and re-originate sessions per request (stateless shims), nor to DLP applied only to outbound model traffic rather than inbound tool results.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-tool-result-redaction-as-a-state-mutating-event-rather-than-a-view-layer-filter.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-tool-result-redaction-as-a-state-mutating-event-rather-than-a-view-layer-filter.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-tool-result-redaction-as-a-state-mutating-event-rather-than-a-view-layer-filter.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2656,
    "python_slice_tokens": 627,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A DLP filter at the gateway has two incoherent framings, and the choice between them is load-bearing for agent correctness: 1. **View-layer framing:** redaction is a presentation transform. The agent sees `[REDACTED]`, the \"real\" tool result still exists upstream, and the agent's downstream reasoning is assumed to operate on a lossy *view* of a stable underl...",
    "what_was_observed": "A gateway proxy was configured with a per-session allowlist scoping a research agent to `{web.search, web.fetch, doc.read}` and a DLP rule that redacted any tool-result field matching a PII regex (`email`, `phone`, `ssn`) before forwarding. Rate shaping was set at 30 calls/min/session with a token-bucket. Trace from a live session, condensed: - `t=0` — Agent calls `doc.read(doc_id=\"hr-2024\")`. Tool returns a 40KB JSO...",
    "condition_of_validity": "The view-layer framing is valid only when all three hold: 1. The agent has an out-of-band channel to query \"was this redacted?\" (e.g., a `gateway.receipts` tool, or a response envelope field `_dlp: {redactions: N, fields: [...]}`) and is *prompted* to consult it before acting on suspicious values. 2. The redaction is *stable across the session* — the same up...",
    "decision_boundary": "The boundary is crossed at the moment the proxy decides whether to forward a redacted payload *with* or *without* a state-mutation receipt. The decision rule: - If the session's tool allowlist contains **any** capability whose information domain overlaps the redacted fields (search, fetch, any read of a related corpus), forward **with** receipt and **suppres...",
    "operational_effect": "Under the state-mutation framing, three concrete changes to gateway and harness behavior: 1. **Receipts as first-class results.** Every redacted tool result carries a `_gateway` envelope: `{redactions: N, fields: [...], scope: <session_id>, reconstructable: bool}`. The agent harness treats `reconstructable: true` as a hard stop for autonomous continuation — ..."
  },
  "matched_failure_symptoms": [
    "SECRET_OR_PII_LEAK_IN_LOGS"
  ],
  "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": "7c56f51528b7ec2a79af6bdc3ff722b6dfa6e8dfaccf3ef8297b6a18a9ffbeb5",
    "verified_classes": [
      "DlpReceiptMissingError",
      "SealedCapabilityError",
      "RateLimitProvenanceError",
      "RedactionKind",
      "ToolResult",
      "SessionState"
    ],
    "verified_functions": [
      "gate_tool_result",
      "authorize_call",
      "handle_rate_limit"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "DlpReceiptMissingError",
      "RateLimitProvenanceError",
      "SealedCapabilityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
