{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-loses-taint-provenance-across-an-mcp-tool-call-boundary",
  "title": "What happens when an instance loses taint provenance across an MCP tool-call boundary",
  "date_of_record": "2026 November 14",
  "scope": "Applies to agent runtimes that propagate taint labels (untrusted-origin markers) across Model Context Protocol (MCP) tool invocations within a single trust domain. Does not apply to runtimes that re-derive provenance from scratch on every call, nor to cross-domain federation where taint is intentionally stripped at the gateway.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-loses-taint-provenance-across-an-mcp-tool-call-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-loses-taint-provenance-across-an-mcp-tool-call-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-loses-taint-provenance-across-an-mcp-tool-call-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1540,
    "python_slice_tokens": 301,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct things an MCP runtime can track about a tool result: **the identity of the caller** (who invoked the tool, and under what session) and **the taint of the data** (whether the returned content descends from an untrusted source). These are routinely conflated because in the common case they coincide: a tool called by a trusted agent retur...",
    "what_was_observed": "A tool gateway forwarded a `fetch_url` request from a trusted agent to an MCP server. The URL argument carried a taint label `untrusted:web` because it had been extracted from a prior tool result. The MCP server fetched the page and returned its body. The gateway logged the call with full provenance: caller = trusted-agent, server = fetch-server, args-hash = …, taint-in = `untrusted:web`. The return value was logged ...",
    "condition_of_validity": "The edge-based taint model is valid only under the conjunction of three conditions: 1. **No value-derivation across the boundary.** The MCP server must not transform tainted input into output that the caller treats as fresh. A pure echo or a pure identity tool satisfies this; a fetch, a summarize, a translate, or a SQL query does not. 2. **Response envelope ...",
    "decision_boundary": "The operational decision is whether to treat a tool result as tainted when the response envelope is silent. Two policies are defensible: - **Fail-closed (recommended for write-capable downstreams):** a silent response from a server that received tainted input is treated as tainted. This over-taints pure tools but never launders. - **Fail-open (acceptable onl...",
    "operational_effect": "Runtimes that adopt value-based taint with fail-closed silence observe a measurable increase in blocked downstream calls — typically the derivation-heavy tools (fetch, summarize, parse) become taint sources rather than taint sinks. This is the correct behavior and it is initially surprising: the tools that \"just read data\" are exactly the tools that launder ..."
  },
  "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": "4d683740044bad97d86bbf1bd22d86da047e53765434452147fa9decef5aef33",
    "verified_classes": [
      "TaintProvenanceError",
      "ToolCall"
    ],
    "verified_functions": [
      "resolve_response_taint",
      "guard_downstream"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintProvenanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
