{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-mcp-tool-call-authorization-as-a-decision-made-over-the-arguments-not-the-tool-name-because-the-middlewar",
  "title": "Under what conditions must an instance treat MCP tool-call authorization as a decision made over the *arguments*, not the tool name — because the middleware's per-tool ACL silently over-permits when a single tool multiplexes its target via parameters",
  "date_of_record": "2026 November 27",
  "scope": "Applies to MCP servers that expose coarse-grained tools whose *target resource* is selected by a request argument (path, repo, table, channel, tenant, URL, shell \"command\") rather than by a distinct tool name, and that rely on a name-keyed authorization middleware (allowlist/ACL per tool) plus a name-keyed audit trail. Does not apply to servers where each tool maps 1:1 to a distinct, single-resource capability, nor to transport-level auth (mTLS, bearer scopes) that is already resource-scoped.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-mcp-tool-call-authorization-as-a-decision-made-over-the-arguments-not-the-tool-name-because-the-middlewar.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-mcp-tool-call-authorization-as-a-decision-made-over-the-arguments-not-the-tool-name-because-the-middlewar.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-mcp-tool-call-authorization-as-a-decision-made-over-the-arguments-not-the-tool-name-because-the-middlewar.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2479,
    "python_slice_tokens": 518,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure hinges on the difference between **capability identity** and **effect identity**. An MCP tool is a *capability*: `fs.read`, `db.query`, `http.fetch`, `k8s.exec`. The authorization middleware, by design, keys on capability identity — \"is this agent allowed to invoke `db.query`?\" — because that is the only stable, enumerable surface the protocol ad...",
    "what_was_observed": "A retrieval agent was granted a single MCP tool, `warehouse.query`, with the ACL entry `warehouse.query: allow`. The tool signature was `query(sql: str, database: str = \"analytics\")`. The granting team reasoned that the agent \"only needs read access to analytics,\" and the per-tool ACL was treated as enforcing that. It did not. The `database` argument was unconstrained at the middleware layer; the tool's own handler p...",
    "condition_of_validity": "Per-tool, name-keyed authorization is a valid least-privilege enforcement **iff** for every tool `t`, the set of effects reachable by any argument vector `a ∈ dom(t)` is contained in the effect set authorized for `t`. Formally: `⋃_{a} effect(t, a) ⊆ authorized(t)`. This holds trivially when `dom(t)` selects no resource (pure functions, fixed-target tools) an...",
    "decision_boundary": "An instance must escalate from name-keyed to argument-keyed authorization (or refuse the call) at the following boundary: **the moment a tool's schema admits a target-selector argument whose value is chosen by the model, not pinned by the server.** Concretely, the instance crosses the boundary when: - The tool's `inputSchema` contains a `string`/`enum`/`oneO...",
    "operational_effect": "When the boundary is respected, three properties hold that do not hold otherwise. First, **least-privilege becomes a property of effects, not capabilities** — the agent's reachable effect set is the intersection of its per-tool grants and the argument constraints, and that intersection is what the ACL actually bounds. Second, **the audit trail becomes replay..."
  },
  "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": "7332ada60b7fc86aed6160cd7f6ccde9457e6b05db2619fd1ceba5d7bca21bf6",
    "verified_classes": [
      "UnboundedSelectorError",
      "ToolSpec",
      "NameKeyedACL"
    ],
    "verified_functions": [
      "dispatch",
      "_unbounded_selectors",
      "register",
      "authorize"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "PermissionError",
      "UnboundedSelectorError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
