Skip to content
BENIBIX Learn

tools vs allowedTools

People think tools and allowedTools do the same job. tools decides which built-in tools exist, so a tool left out is never seen by Claude. allowedTools decides which of the tools that exist run without asking. Use tools to shrink the toolbox, and allowedTools to skip the prompt.

AI🧩 Claude Agent SDK

tools Option

The option that sets which built-in tools are there at all.

tools is the Agent SDK option that sets which built-in tools exist in a session. You pass a list of tool names, or the claude_code preset for Claude Code's full set. A tool left out is gone, so Claude never sees it. An empty list removes every built-in tool, which leaves only your MCP tools. It decides what exists, not what runs without asking.

Example
Mia's agent should only use her own database tools. She passes tools: [], so no built-in tool is there to tempt it.
Why it matters
A tool Claude cannot see is one it cannot misuse. It also costs no space in the context.
Full entry
AI🧩 Claude Agent SDK

allowedTools Option

The option that lists tools the agent may use with no prompt.

allowedTools is an Agent SDK option that lists tools Claude may use with no approval step. In Python it is allowed_tools. A rule can name a whole tool, such as Read, or part of one, such as Bash(npm *). It does not limit Claude to those tools. A call to a tool not on the list goes to the permission mode instead.

Example
Leo's agent reads code and runs tests. He allows Read, Glob and Bash(npm test), so it never stops to ask for those.
Why it matters
An agent that stops for each read is slow. One that asks for nothing is a risk.
Full entry

In one line

tools Option
The option that sets which built-in tools are there at all.
allowedTools Option
The option that lists tools the agent may use with no prompt.