🧰 MCP tool authorization
An MCP server exposes a fixed catalog of tools, each declaring a required_scope. Every invocation is authorized against the
acting identity's scopes before the (simulated) tool ever runs — least privilege enforced
right at the tool boundary, the MCP analog of OAuth scopes gating an API call.
You can invoke as one of your own agents, or present a delegation token minted on the A2A lab — authorization checks the token's attenuated scope, never the root agent's full scopes, and every hop in its chain is re-checked live. A killed agent (or a killed link in a delegation chain) can invoke nothing.
Try this: grant your agent only a couple of scopes and watch a tool outside them get denied.
Then delegate an attenuated token that drops one of those scopes and invoke the SAME tool with
the token — it's denied for the same reason, at the tool boundary. Finally, kill any agent in
that delegation chain and invoke again with the same token — it fails chain_inactive, even if the root agent is still alive.
Tool catalog
Fixed and simulated — no tool here ever has a real side effect.
Invoke a tool
Tool policies
Holding a scope says WHICH tools an agent may call. A policy says HOW — capped, restricted, or forbidden outright — even when the scope alone would allow it. Policies compose as a strict AND on top of the scope gate above: they can only ever tighten a call the scope check would have allowed, never loosen one it denied.
Your rules
Listed in evaluation order: lowest priority first, ties broken by rule id — and the first rule that matches decides the call,
so nothing below a match is even consulted. That is what lets a narrow allow sit above a broad deny. A
rule scoped to one agent only takes part in that agent's calls; "all my agents" rules take part
in every one.
No rules yet — every call falls through to each agent's default mode (below).
Add a rule
Per-agent default mode
What happens when NO rule matches. allow keeps today's unchanged
behavior; deny is real least-privilege — nothing runs for that
agent unless a rule explicitly permits it.
You have no agents yet.
Sample-invocation trace
Preview what the SAME evaluator mcp.ts's invoke path uses would decide for one of your agents — the tool never actually runs here.