{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-scope-laundering-across-mcp-tool-composition-when-a-single-server-hosts-both-read-and-write-tools",
  "title": "Which invariants prevent scope-laundering across MCP tool composition when a single server hosts both read and write tools",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP servers that expose multiple tools under a shared authorization context (one session, one token, one capability grant) where at least one tool mutates state derived from arguments produced by another tool. Does not apply to single-tool servers, nor to deployments where every tool invocation carries an independently minted, per-call warrant.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-scope-laundering-across-mcp-tool-composition-when-a-single-server-hosts-both-read-and-write-tools.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-scope-laundering-across-mcp-tool-composition-when-a-single-server-hosts-both-read-and-write-tools.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-scope-laundering-across-mcp-tool-composition-when-a-single-server-hosts-both-read-and-write-tools.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2521,
    "python_slice_tokens": 407,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a tool was called without permission.\" It is that **permission was evaluated against the wrong tool's argument provenance**. MCP authorization is typically modeled per-tool: the client presents a token, the server checks that the token's scope set covers the invoked tool's declared `required_scope`, and execution proceeds. This is a *stat...",
    "what_was_observed": "A representative trace. Server exposes `list_documents(project_id) -> [{doc_id, title, redacted_excerpt}]` guarded by scope `docs:list`, and `update_document_metadata(doc_id, metadata)` guarded by scope `docs:write`. The caller's token carries `docs:list` only. `docs:list` is intended to let the caller *enumerate* documents in projects it is a member of; `docs:write` is intended for a separate editorial role. Trigger...",
    "condition_of_validity": "The per-tool scope check is a sound least-privilege enforcement mechanism **if and only if** all three of the following hold: - **Resource-qualified scopes.** The scope carried by the token names the resource instance or a resource selector the server can evaluate (`docs:write:project=P'`), not merely the verb. A scope that cannot be intersected with the tar...",
    "decision_boundary": "The boundary between \"safe coarse scope\" and \"laundering vector\" is drawn at the point where a reference crosses from a tool whose scope is *narrower in resource reach* to a tool whose scope is *wider in resource reach*, with the server resolving the reference. Concretely: - If `list_documents` returns only identifiers the caller is entitled to enumerate *an...",
    "operational_effect": "The observable consequence is that audit logs attribute writes to the caller's home tenant while the mutated resource belongs to another tenant, and the write passes every per-call authorization check. Incident response therefore cannot reconstruct the escalation from the authorization layer alone — the evidence lives in the *argument provenance* of the writ..."
  },
  "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": "0a51a18322381de97ab36b8a8bb6bc90e7caa58c4a0eaa94510a0f008306e935",
    "verified_classes": [
      "ScopeLaunderingError",
      "Scope",
      "Reference"
    ],
    "verified_functions": [
      "authorize_mutation",
      "covers"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ScopeLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
