GET ones, read Gmail without ever sending, and block
it from managing agents for good.
1. Find the tool names
A permission names both the tool and who owns it. Built-ins start withtool:builtin: and are listed in Built-in tools.
Tools your workspace registered start with tool:workspace: and sit under
their toolset namespace, which you can list:
billing namespace publishes billing.lookup_invoice, so you
grant tool:workspace:billing.lookup_invoice. Managed provider toolsets (Gmail,
Calendar, Linear) ship with Matrices, so they never show up in that list. You
still grant them by name, like tool:managed:gmail.*.
2. Write the allows
http.request makes one HTTP call, using whatever method the model picked.
Put a condition on the entry and you pin that field, so this role can read from
an API but never write to one:
where is checked against the tool input exactly as the model wrote it. The
operators and paths are in Permissions.
3. Grant by level
That last entry,tool:managed:gmail@read, is a level selector. Every
built-in and managed tool has a level: read tools only look (search, get,
list), write tools change something as the user (draft, label, send). @read grants every
Gmail tool at the read level and none above it, including read tools Gmail
gains later. @write would grant both levels.
The level also caps the login. Since this role selects only Gmail’s read
tools, the agent’s Gmail connection tops out at
read_only, and connections.connect refuses to ask for more.
Levels work for builtin and managed tools, not your own toolsets, and a
level selector takes no where. The rest of the rules are in
Permissions.
4. Deny a whole family
An allow only ever adds tools. To take one away no matter what the other roles grant, deny it:tool:* can’t let this agent create or
delete agents. Denies only work on built-in tools, never on a toolset
namespace, and never on a level.
5. Select the role in the profile
Roles attach to the profile, not the agent. The patch replaces the whole list instead of adding to it, so send every role you want, including the one from the first guide. It also names the profile version you last read, so it fails instead of overwriting someone else’s change:Check it worked
builtIns lists the role-controlled built-ins the agent holds. http.request
is there, and nothing from agents.* is. Core tools like thread.send never
appear, because no role controls them. conditional shows the GET-only
grant, and gmail holds only read tools like search_threads, never
send_email. Ask the agent to POST something and the call is refused before
it runs.
Allows add up, conditions narrow one entry, levels pick by what a tool does,
denies win. The full stacking table is in
Permissions.
Where next
Approve a tool call
Let the write through, but only after a human says yes.
Connect a service
Give it a login to go with the permission.