Tool rules
tools.deny, tools.ask, and tools.allow gate every tool except Bash by matching the tool name against glob patterns. (Bash always goes through the bash pipeline instead — see below.)
The three lists
tools:
# Always deny. Objects carry metadata so the denial is actionable.
deny:
- tool: "mcp__dangerous_*"
description: "Blocked by policy"
alternative: "Use safe_tool instead"
# Prompt the user. Plain glob strings.
ask:
- "mcp__plugin_slack_*"
# Silently allow. Plain glob strings.
allow:
- "Read"
- "Edit"
- "Glob"
- "Grep"
Note the shapes differ:
allowandaskare lists of bare glob strings.denyis a list of objects withtool(the glob), a requireddescription, and an optionalalternative. Those become the reason Claude sees when it's blocked.
Evaluation order
Tier precedence is deny > ask > allow > default:
tools.deny— first matchingtoolglob → deny (with itsdescription/alternative).tools.ask— first matching glob → ask.tools.allow— first matching glob → allow.- No match →
config.default.
The most restrictive matching tier wins. Within a tier there's no specificity ranking: first match wins.
Glob syntax
Tool names are simple identifiers, so the glob is intentionally minimal:
| Pattern | Matches |
|---|---|
Read | exactly Read |
mcp__plugin_slack_* | mcp__plugin_slack_send_message, mcp__plugin_slack_list_channels, … |
mcp__* | every MCP tool |
Notebook?dit | NotebookEdit (? = one character) |
* expands to "any characters", ? to "a single character"; everything else is matched literally. Patterns are anchored end-to-end.
Bash is never matched here
Listing Bash in tools.allow has no effect. fencepost always routes Bash through the command-level bash pipeline, regardless of the tool-name lists. This is deliberate — it prevents a single allow: ["Bash"] from waving every shell command through and bypassing your command rules.
Examples
Allow Claude's read tools, ask before anything that reaches a network MCP, deny a known-bad one:
tools:
allow:
- Read
- Glob
- Grep
ask:
- "mcp__*" # any MCP server → prompt
deny:
- tool: "mcp__legacy_*"
description: "The legacy MCP server is deprecated and unsafe."
alternative: "Use mcp__plugin_context7_* for docs instead."
Because tiers resolve deny → ask → allow, mcp__legacy_foo is denied even though it also matches the broader mcp__* ask rule.
The claude preset already allow-lists Claude's built-in tools (file tools yes, WebFetch/WebSearch left to your default). Import it instead of hand-listing them.