Repository navigation
Closed
Labels
Description
Depends on: #2527 (registration records each instance's definition and parent)
Removes shortcut: helpers that run a named definition get no gateway tools (#2555)
Adds shortcut: the limit is a plain set check, not generated Cedar policy, and decision records name no policy revision, removed by #2849
Problem
The broker accepts every call's tool without checking it. The only limits on which tools an agent may call sit inside the agent host: the harness's delegation restrictions, and plan mode's filter based on the server's own read-only hints. A helper can call any tool its catalogue offers. Nothing outside the agent loop keeps an agent, or its children, to the tools its definition allows.
Implements
- mcp-authorization.md: Definition-derived ceiling: resolution, the exact-pair check, default deny
- mcp-authorization.md: Delegated authority: the effective ceiling at registration
- agent-definitions.md: Harness configuration and broker authority and Loading definitions: ceiling rules, including the built-in definitions
- agent-definitions.md: Identity continuity across runs and restarts: the "Authority work switched on" row
- credentials-and-lifecycle.md: (6) Per-operation authorization: check 7 and its failure row
- audit.md: Evidence and provenance: the "Ceiling evaluation and broker decision" row
- implementation.md: Cedar authorization and audit verification: the bullets on resolution, selection through trusted registration, intersection (including the cross-check with the harness intersection), default deny, the exact pair, and preserving the other checks
Scope
- A scheduled run's limit is its schedule's definition (Phase 2, Slice 3: Scheduled runs — A scheduled run calls gateway tools on its own grant, with no one present #2569, docs(agent-identity): keep a re-registered instance's revision, and pin a schedule's definition #2866).
- Resolves each loaded definition's ceiling at load.
system/main,system/explorer,system/branch, andsystem/memberget theirs from their built-in fields. - Stores each instance's effective ceiling at registration, and checks every call against it.
- Backfills live instances when the check is switched on.
- Def-less helpers get the session's gateway tools today, bounded only by the authority they inherit from their parent (Helper agents: their own registered identity and broker MCP tools #2555).
- The check sits behind one interface, so [Phase 3] Express the tool limit as generated Cedar policy #2849 can replace it with generated Cedar policy and add policy revisions.
- Not in scope: task-specific delegation bounds and gateway-side enforcement (deferred in the design).
Decide before starting
- Where does the broker get each gateway server's tool list to resolve definitions against? The design resolves against "registered MCP servers and their tools" but does not say where those come from.
Done when
- The implementation.md bullets above pass. That includes the property tests showing a child's effective ceiling is within its definition's and its parent's, and the test that the deployer child of a read-only reviewer is denied merge.
- A call outside the effective ceiling, or one whose evaluation errors, is refused as check 7's row says, before any token is issued.
- Each decision record names the evaluated ceiling.
- Live instances are backfilled as the "Authority work switched on" row says.
Activity
ChrisJBurns commentedon Nov 18, 2026
Design decision for this ticket: Where does the broker get each gateway server's tool list, to resolve an agent definition's limit into server/tool pairs? The design resolves at admission "against registered MCP servers and their tools" but does not say where those come from (for example, gateway entries list their tools).
Where it goes: mcp-authorization.md: Definition-derived ceiling.
Decide it when this ticket is picked up, and record the answer as a small design edit (reviewed by the design's author) before or with the ticket's first PR.
feat(identitybroker): give def-less helpers the session's gateway tools
feat(identitybroker): give def-less helpers the session's gateway tools
feat(identitybroker): give def-less helpers the session's gateway tools
docs(identitybroker): note the per-agent tool limit shortcut
feat(identitybroker): give def-less helpers the session's gateway tools
docs(identitybroker): note the per-agent tool limit shortcut
rdimitrov commentedon Nov 20, 2026
Decision for #2842, proposed: what the broker resolves a definition's limit against
The open question: the design resolves a definition's
Tools,DisallowedTools, andMCPServers"against registered MCP servers and their tools", but doesn't say where those come from.Proposal: resolve against the gateway servers in the operator's MCP configuration, without each server's tool list.
mcp.serversinsettings.yaml), the same list mecak8s's MCP client routes through the gateway. The loader reads it when it loads definitions, so the same definition and configuration always produce the same limit.MCPServersnames, minus the exact names itsDisallowedToolslists (internal/app/agentdefs.go).Toolscan't select MCP tools today. The broker keeps the same meaning: each referenced server becomes an entry "every tool of this server, except these names". Each call's exact server and tool are checked against it, by comparing the tool's catalog name, so nothing has to parsemcp__<server>__<tool>.MCPServersmeans no gateway tools, as today.system/maingets them all, as the main conversation does today. Forsystem/explorer,system/branch, andsystem/member, the parent's limit then narrows that at registration, which keeps what Helper agents: their own registered identity and broker MCP tools #2555 does today.Why not resolve against tool lists:
mcp-authorization.md; List gateway tools with a broker-issued token #2729), and nobody is signed in at broker startup. The list can also differ per user.toolslists in the configuration are optional and exist only for some OAuth backends. Requiring them would leave every other server with no grantable tools.What changes in behavior: a tool the gateway adds later is inside the limit of every definition that references its server, unless the definition excludes it by name. That's what the harness does today. A definition that wants a fixed set keeps excluding by name until
Toolscan select MCP tools.Later: #2849's generated Cedar policy can express a server-wide entry with exclusions directly (
resource in Server::"github", minus the excluded tools), so this doesn't need re-resolving then. Adding a server to the configuration changes the limit only for instances registered after the broker reloads it; registered instances keep their stored limit, as the design requires.Where it goes: a paragraph under Definition-derived ceiling, after the sentence on resolution: "Registered MCP servers are the servers in the operator's MCP configuration. A referenced server resolves to all of its tools except those
DisallowedToolsnames, kept as one server-wide entry that each call's exact server and tool are checked against. Resolution needs no tool list, since listing tools needs a user's grant and can differ per user."If this looks right, I'll record it as a small design edit with the ticket's first PR.
rdimitrov commentedon Nov 21, 2026
Sign-off needed on the decision above before #2937 merges, plus three clarifications from review.
mcp__<server>__<tool>" holds for calls. The loader does parse each exclusion once, at resolution, to find its server. A call is checked by its exact server and tool.agent-definitions.mdnow records this.Also: a server-wide entry permits the server's tools as they are when each call is checked, so a tool added later is allowed unless excluded by name. The design's "server/tool pairs" wording is reconciled in
mcp-authorization.mdandimplementation.md.