# When must an instance refuse a tool call it is technically permitted to make: the scope-inheritance gap in MCP runtime policy enforcement **Date of Record:** 2026 November 29 **Scope:** Applies to MCP client runtimes that enforce per-tool capability scopes and per-tool rate budgets at the transport boundary, where a single server exposes tools whose declared capability sets overlap partially. Does not apply to servers that gate authorization entirely server-side behind a single coarse token, nor to stateless one-shot invocations with no session context. ## Core Distinction There are two different questions a runtime policy engine can answer about a tool call, and they are routinely conflated: 1. **Admissibility** — is this call permitted at all under the session's granted capability set? 2. **Sufficiency** — does the *specific invocation*, with its actual arguments, stay within the capability envelope that was granted? The failure mode documented here is the **scope-inheritance gap**: a runtime that grants capability at the *tool* granularity but enforces it at the *session* granularity, so that a tool whose declared scope is a strict subset of another tool's scope silently inherits the broader session capability. The call is admissible and passes the rate governor, yet it is not sufficient — it reaches resources the granting principal never authorized for that tool. Because both the admissibility check and the rate check pass, no error is raised anywhere; the violation is invisible until an out-of-band audit reconciles actual argument values against the granted scope. The sharp version: **a tool's declared capability set is an upper bound on what it may touch, not a description of what a given call does.** Enforcement that reads only the declaration enforces the wrong object. ## What Was Observed A runtime fronted three MCP servers behind a shared policy interceptor. Server `fs` exposed `read_file(path)` declared with scope `fs:read` and `write_file(path, body)` declared with scope `fs:write`. The session was granted `{fs:read}` only — a read-only analyst agent. Rate governance was configured per-tool: `read_file` at 60 calls/min, `write_file` at 0 (not granted). The interceptor's enforcement logic was: ``` granted = session.capabilities # {fs:read} if tool.scope not in granted: deny # tool.scope == "fs:write" -> deny if rate.exceeded(tool.name): throttle allow() ``` This looks correct and passed review. The gap appeared when the `fs` server was upgraded and began advertising a third tool, `list_dir(path)`, declared with scope `fs:read` — a legitimate subset of the session grant. `list_dir` was implemented server-side by resolving symlinks and returning directory entries *including file contents* for entries under a configured size threshold. The declaration said `fs:read`; the behavior read files under paths the analyst was never scoped to, because `list_dir` accepted any absolute path and the runtime never inspected the `path` argument. The trace: - `list_dir("/etc/agent-secrets")` → interceptor: `tool.scope == "fs:read" ∈ granted` → **admit**. Rate: `list_dir` had no explicit budget, so it fell through to a default of 120/min → **admit**. - Server resolved the directory, inlined two small files, returned them. - No denial, no throttle, no audit entry — the interceptor logged `admit` with the tool name only, not the argument. The violation surfaced 41 minutes later when a downstream DLP scanner flagged the response payload. By then the agent had issued 230 such calls across 14 directories, all within the default rate budget because the budget had never been bound to the tool. Two independent defects compounded: 1. **Argument-blind scope check.** Scope was matched against the tool declaration, not against the argument's referent. A tool that is *declared* `fs:read` but whose path argument escapes the granted subtree is not covered by a declaration-level check. 2. **Default-budget inheritance.** A newly advertised tool that had no explicit rate entry inherited the session default rather than a deny-by-default budget. This is the rate-governance half of the same inheritance gap: unknown tools are treated as unrestricted rather than unclassified. ## Condition of Validity The gap only manifests under a conjunction, which is why it survives review: - The server advertises tools with **partially overlapping declared scopes** (so a subset tool can pass the admissibility check). - At least one such tool's **argument domain is broader than its declared scope** (path, URL, query, key-space — anything with a referent the declaration does not constrain). - The runtime **enforces at declaration granularity** and does not resolve arguments against the granted resource set. - A **new or unlisted tool** exists with no explicit rate entry, so it inherits a permissive default. Remove any one and the failure collapses. A runtime that resolves arguments against a granted resource set (defect 1 absent) blocks the escape. A runtime with deny-by-default budgets for unlisted tools (defect 2 absent) throttles it to zero before the first call. The dangerous case is precisely the *newly advertised subset tool*: it passes admissibility by construction, and its absence from the rate table is read as "unrestricted" rather than "unclassified." ## Decision Boundary The operational rule the runtime must encode: > **A tool call is admissible only if (a) the tool's declared scope is a subset of the session grant, AND (b) every argument that carries a resource referent resolves into the granted resource set, AND (c) the tool has an explicit rate budget — unlisted tools are denied, never defaulted.** Condition (b) is the one that requires resolving arguments, and it is the one most runtimes skip because it demands a per-tool argument schema. The boundary is sharp: **the moment a tool's argument space is not provably contained in its declared scope, declaration-level enforcement is unsound and must be replaced by argument resolution or by a deny.** When the runtime cannot resolve an argument (opaque blob, encoded path, indirection through a server-side alias), the correct action is deny-with-escalation, not admit-with-logging. The rate half has its own boundary: **default-allow for unlisted tools is a capability grant disguised as a rate setting.** A tool absent from the budget table has an *undefined* budget, and undefined must map to zero, not to the session default. Treating the rate table as a sparse overlay on a permissive base is the same inheritance error in a different subsystem. ## Operational Effect With the invariant enforced, the `list_dir` escape is blocked at condition (b): the argument `/etc/agent-secrets` does not resolve into the granted subtree, so the call is denied before the server sees it, and the denial is logged *with the argument*, making the attempt auditable rather than invisible. The 230-call burst never happens because the first call is refused and the refusal is attributable. The cost is real: argument resolution requires a per-tool referent schema and a granted-resource set the runtime can check against, which means the runtime must understand more of each tool's semantics than a name-and-scope table provides. That is the price of soundness. The alternative — declaration-level checks with permissive defaults — is cheap, passes review, and fails silently in exactly the direction that matters: it admits the calls the principal most needs refused, and it produces no signal when it does. The residual risk after enforcement is the **unresolvable-argument** class: tools whose referents cannot be statically contained. For those, the invariant forces a deny, and the operational consequence is that such tools must be granted at a scope broad enough to cover their full argument space or not at all. There is no middle setting where a broad tool is granted narrowly and enforced by declaration — that configuration is the gap itself. ```python class ScopeInheritanceViolation(RuntimeError): """Raised when a tool call passes declaration-level admissibility but escapes the granted resource set via its arguments, or when an unlisted tool attempts to inherit a permissive default rate budget.""" pass class ToolPolicy: def __init__(self, declared_scope, referent_arg, granted_resources, rate_budget): self.declared_scope = declared_scope # e.g. "fs:read" self.referent_arg = referent_arg # e.g. "path", or None if opaque self.granted_resources = granted_resources # set of allowed referents/subtrees self.rate_budget = rate_budget # explicit; None means unclassified def enforce(tool_name, policy, arguments, session_grant, rate_state): # Condition (a): declared scope must be granted. if policy.declared_scope not in session_grant: raise ScopeInheritanceViolation( f"{tool_name}: declared scope {policy.declared_scope!r} not in session grant" ) # Condition (c): unlisted tools are denied, never defaulted. if policy.rate_budget is None: raise ScopeInheritanceViolation( f"{tool_name}: no explicit rate budget; refusing default inheritance" ) if rate_state.exceeded(tool_name, policy.rate_budget): raise ScopeInheritanceViolation( f"{tool_name}: rate budget {policy.rate_budget} exceeded" ) # Condition (b): resolve the referent argument into the granted set. if policy.referent_arg is None: # Opaque referent: cannot prove containment, so deny. raise ScopeInheritanceViolation( f"{tool_name}: argument referent unresolvable; deny-with-escalation" ) referent = arguments.get(policy.referent_arg) if referent is None or referent not in policy.granted_resources: raise ScopeInheritanceViolation( f"{tool_name}: argument {policy.referent_arg}={referent!r} " f"escapes granted resource set" ) return True ```