# disallowedTools Option

> The option that blocks a tool, or some uses of it, in all modes.

**Field:** Artificial Intelligence  
**Category:** Claude Agent SDK  
**Also known as:** disallowedTools, disallowed_tools, Agent SDK blocked tools, Claude Agent SDK disallowedTools

## Think of it like

It is like a lock on the cupboard with the knives in it.

## Definition

disallowedTools is an Agent SDK option that blocks tools. In Python it is disallowed_tools. A bare name, such as Bash, takes the tool away from Claude. A scoped rule, such as Bash(rm *), keeps the tool but blocks the calls that match. A block holds in every permission mode, even bypassPermissions, and even when a hook said yes.

## Example

Mia's agent must never reach the web. She puts WebFetch and WebSearch in disallowedTools.

## Example code

```typescript
disallowedTools: ["WebFetch", "Bash(rm *)"]
```

No web fetches, and no rm commands.

## Why it matters

Some things must never happen, whatever mode the agent is in.

## Common mistake

Leaving a tool off allowedTools and thinking that blocks it. Only this option blocks.

## Three principles

- **Blocks in every mode.** Even bypass.
- **Bare name removes it.** From Claude.
- **Scoped rule blocks calls.** Bash(rm *).

## Related terms

- [allowedTools Option](https://learn.benibix.com/term/ai/allowed-tools-option)
- [permissionMode Option](https://learn.benibix.com/term/ai/permission-mode-option)
- [Permission Rule](https://learn.benibix.com/term/ai/permission-rule)

## Told apart from

- [allowedTools vs disallowedTools](https://learn.benibix.com/compare/allowed-tools-option-vs-disallowed-tools-option): People think allowedTools is a full list, so a tool left off it is blocked. It is not. allowedTools only lets the listed tools run with no prompt, and other tools still go to the permission mode. disallowedTools is the one that blocks, and its block holds in every mode, even bypass.

---

Source: https://learn.benibix.com/term/ai/disallowed-tools-option
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
