Every tool the agent calls maps to a permission in Scute and, usually, an object. permissions asks the engine about that permission on that object.
The naming convention#
The first word of the tool name is the action; the rest is the resource type. Camel case is split into words.
| Tool name | Permission | Action sent to the engine | Resource type |
|---|---|---|---|
| refund_invoice | invoice:refund | refund | invoice |
| resetUserMfa | user_mfa:reset | reset | user_mfa |
| search | search | search | none |
A tool name with no letters or digits is still checked (and denied as an unknown permission), never skipped. TypeScript exports the function as toolPermission(name), Python as permission_for(name), Ruby as Scute::Harness::ToolSpec.permission_for(name).
The object#
For a permission with a resource type, the harness looks for the object's key in the arguments, in this order:
- <type>_id (invoice_id)
- <type>Id in camel case (invoiceId)
- id
The first non-empty string or finite number wins. refund_invoice({ invoice_id: "INV-1" }) is checked as invoice:refund on invoice:INV-1. Without a key, the check is on the type alone (invoice).
Arguments go as context, not attributes#
The full arguments reach the engine as context.args, so a policy condition can read them (context.args.amount < 500). They never become the object's attributes: the object's attributes come from what Scute stores for it, which the model cannot override. Use the attributes option below to pass attributes from arguments on purpose; Scute's stored attributes still win.
Run-wide values in the run's context option, and per-call values from permissions({ context }), are merged into context too.
The tools map#
Override the convention per tool. Every field is optional.
createHarness({ agent: "support-bot", tools: { send_money: { permission: "payment:create", key: "to", tier: "high" }, refund_invoice: { tier: "high", attributes: (args) => ({ currency: args.currency }) }, get_weather: false, // no permission check }, defaultTier: "low",});Setting the tool to false instead of a map is the same as permission: false.
Tiers#
The harness has three tiers: low, medium and high. A tool's tier only matters to guards that read it:
- approval asks the person to confirm high tier calls unless you pass another when.
- budget with perHour as a map counts executions per tier.
- when: { tier: ... } on verifyPerson, approval, requesterOnly and grounding selects calls by tier.
In Ruby, tiers are symbols (:high); in Python, strings.