Safety / Tool access

How to Choose AI Agent Tools and Permissions

Choose an AI agent's tools and permissions by defining what it needs to produce. Then give it access only to the files, accounts and actions needed for that task. Separate reading information, preparing drafts and making changes that affect other people.

01

Start from the output, not the tool menu

Write down the expected output, such as a draft proposal or weekly report. List the information and actions needed to produce it. That list should guide which tools you connect.

Check the actual access each tool provides. An account that can read one report may also be allowed to edit or delete records. Use a restricted account or connection where possible, and test the limits before using client data.

  • The exact artifact this run has to produce
  • The smallest source of truth it needs to read
  • The single destination it is allowed to write to
  • The one external action, if any, that needs a person
02

Which permission tier does this action belong in?

Use three categories. Read means gathering information. Draft means preparing work in a location where it can be reviewed. Execute means taking the consequential action, such as sending a message, publishing a page or changing a business record.

A process that prepares outreach email may need permission to read contact details and save a draft, but not to send. Keep these permissions separate so the reviewer retains the final decision.

TierExample actionDefault ruleUndo cost
ReadFetch a page, list a folder, query a reportAllow, scoped to named paths and domainsNone
DraftWrite a file, save a draft, open a branchAllow inside the working directory onlySeconds
ExecuteSend, publish, spend, deploy, deleteAsk every time, with the target read backHours to never
Permission tiers Monolith uses when scoping a client agent build, with the default rule for each
03

How different agent tools describe permissions

The products use different names for similar controls. Use the table to locate the relevant settings, then confirm their behavior in the version you are running.

ControlClaude CodeHermesOpenClaw
Rule outcomesAllow, ask, and deny listsSmart, manual, or off, plus deny globsDeny, allowlist, ask, auto, or full
PrecedenceDeny wins, then ask, then allowDeny patterns beat the standing allowlistPolicy, allowlist, and approval must all agree
Unattended runsBypass mode can be disabled by policyCron and unattended default to denyAuto review escalates to a human route
Where rules liveProject and user settings filesOne user config file plus an env fileA gateway config key, set from the CLI
Approval storeSettings file, checked into the repoUser config directoryHost local, exact path unconfirmed
Permission controls by harness, taken from the current Claude Code, Hermes, and OpenClaw documentation

Two lessons carry across all three. Deny beats allow, so a broad deny cannot hold a narrow exception inside it. And any pattern that tries to constrain arguments is weaker than it looks: a rule that pins a command to one URL will miss the variants.

Claude Code permissions, narrowed to one projectjson
{
  "permissions": {
    "allow": [
      "Read(./src/**)",
      "Bash(npm run build)",
      "WebFetch(domain:docs.stripe.com)"
    ],
    "ask": [
      "Bash(git push *)",
      "Bash(npx vercel *)"
    ],
    "deny": [
      "Read(./.env)",
      "Read(./secrets/**)",
      "Bash(curl *)",
      "Bash(wget *)",
      "Bash(rm -rf *)"
    ]
  }
}
The same three tiers expressed in the Hermes config fileyaml
# ~/.hermes/config.yaml
approvals:
  mode: smart
  timeout: 300
  cron_mode: deny
  unattended_mode: deny
  deny:
    - "git push --force*"
    - "rm -rf *"
command_allowlist:
  - npm run build
OpenClaw shell policy, set from the command linebash
openclaw config set tools.exec.mode allowlist
openclaw approvals allowlist add "npm run build*"
openclaw gateway restart
04

Check what the connected account can access

Permission to run a tool and the tool's account access are separate controls. An API key is a credential used to connect software to a service. Check what that key can read or change, even if the agent is allowed to call the tool.

  • Issue a separate key for the agent, never the shared team key
  • Restrict that key to the exact scopes the deliverable needs
  • Point the agent at a test account until the workflow is boring
  • Keep secrets in an environment file, outside the skill package
  • Read the destination back before any send, publish, or deploy

Before approval, show the account, destination and exact action. A correct operation aimed at the wrong website or customer list is still a mistake. Compare those details with the project brief.

05

What changes when you connect an MCP server

An MCP server hands your agent tools the harness did not write. The 2026-07-28 revision of the Model Context Protocol moved to a stateless request and response model and put the method and tool name into HTTP headers, so a gateway can authorize a call without parsing the body. If you run your own gateway, that is where a central allow list now belongs.

A tool description may label an action as read-only or destructive. Treat that as information to verify, rather than a guarantee enforced by the label itself.

06

Add one tool at a time

Test a new tool on sample data. Check the output, what happens if it times out, its usage charges and what information it retains. Then set the permissions needed for the next run.

07

What to review every quarter

  • Remove tools no workflow has called in ninety days
  • Re-read the allow lists after every harness update
  • Rotate the agent keys and drop scopes nothing uses
  • Confirm cron and unattended runs still default to deny
  • Re-check any MCP server that shipped a new tool list

Review permissions regularly and remove access the process no longer needs. Record why each remaining permission exists so the next reviewer can understand it.

What is the safest default for a brand new agent?

Start with access to approved information and a separate place to save drafts. Add further permissions only when the task needs them and the behavior has been tested.

Should an agent ever send email on its own?

Keep drafting and sending separate. If sending is later automated, define recipients, message rules, exceptions and review requirements explicitly. A successful draft alone does not establish that unattended sending is appropriate.

Do deny rules stop prompt injection?

Permission rules can block some actions, but they do not prevent every misleading instruction. Combine them with restricted account access, isolation where available and tests of the complete workflow.

Put it to work

Map the permissions before anything runs

Inventory the accounts, files, and actions the workflow needs. We can help separate read access from draft and execution permissions, with a named approval gate before anything is sent, published, or changed externally.

Continue the field manual

Related guides