Module 07: Tool Permissions
Controlling which tools Claude can use.
What You’ll Learn
allowedTools: Explicitly allow specific tools (only these are available)
disallowedTools: Block specific tools (all others remain available)
- Common Claude Code tools
- When to use each approach
Claude Code has access to these built-in tools:
Claude can ONLY use tools in this list. Use for maximum control:
All tools are available EXCEPT these. Use to block specific dangerous operations:
Which Approach to Use?
Read-Only Agent
Safe Editing Agent
Research Agent
Key Points
allowedTools is more restrictive - use for sensitive environments
disallowedTools is more permissive - use when you just want to block specific tools
- Tool permissions are enforced at the CLI level, not just in your code
Do not combine allowedTools and disallowedTools. When allowedTools is set, only those tools are available. Adding disallowedTools has no effect since unlisted tools are already blocked. Choose one approach.
Tradeoffs
- allowedTools: More secure but requires knowing all tools needed upfront. New Claude Code tools added in future updates will be blocked by default.
- disallowedTools: More flexible but less secure. New tools added in future Claude Code versions will be allowed by default.
- Neither: All tools available. Only appropriate when running in a sandboxed environment.
- Tool names are case-sensitive and must match exactly (e.g.,
"Bash" not "bash").
- Invalid tool names fail silently - no error if you typo a tool name.
Source Code
View on GitHub
Running the Example
Next Module
Module 08: Permission Modes - Control how Claude handles tool execution permissions.