Skip to lesson

AnthropicClaude Certified Architect – Foundations2026-100 Prerequisites

Check availability before approving tool use

Completed by the knowledge check

Learning objective

Distinguish available, pre-approved, and denied tools and identify when human approval is required

Core idea

Ask two questions about any tool: can Claude request it, and may this particular call execute? Availability answers the first, permissions the second. An available tool can still need a person’s confirmation, and a pre-approval rule still loses to an explicit denial. Claude Code enforces both outside the model: an instruction in a prompt or CLAUDE.md changes what Claude asks for, not what it is allowed to do.

How it works

Available

The --tools flag restricts which built-in tools exist for a session: --tools "Bash,Edit,Read" selects three, and --tools "" disables them all. It does not affect MCP tools; the CLI reference points to --disallowedTools "mcp__*" to deny those too. A deny rule that names a bare tool, such as Bash, also removes it from Claude’s context entirely.

Pre-approved

--allowedTools (also --allowed-tools) lists tools that execute without prompting. It does not restrict the session to those tools — the CLI reference sends you to --tools for that. A rule can be scoped: Bash(git diff *) pre-approves matching commands, not every shell operation. The persistent equivalents are permissions.allow, permissions.ask and permissions.deny in settings. A skill’s allowed-tools frontmatter is likewise a grant, not a restriction; 3.2.5 owns that case.

Denied

A scoped deny such as Bash(rm *) leaves Bash available and blocks matching calls. Rules are evaluated in order — deny, then ask, then allow — and the first match decides; specificity does not change the order. If a tool is denied at any level, no other level can allow it: a managed deny cannot be overridden by --allowedTools. Deny rules block in every permission mode, including bypassPermissions.

Human approval

A call that no rule or mode resolves reaches a person. In an interactive session that is the permission prompt. In the Agent SDK it is your permission callback, canUseTool in TypeScript or can_use_tool in Python, which also receives Claude’s clarifying questions as AskUserQuestion calls. The callback never fires for a call already approved by an allow rule or a mode such as acceptEdits, so pre-approval removes the person from that call. In dontAsk mode Claude Code auto-denies every call that would otherwise prompt: no prompt means refused, not approved.

Separating these gates from business-policy checks in code, and testing that a prohibited call never executes, is taught in 1.5.3; the permission flags and modes for an unattended CI job in 3.6.1.

Key distinctions and trade-offs

GateMechanismEffect
Available--tools, bare-tool denyWhether Claude can request the tool at all
Pre-approved--allowedTools, permissions.allowMatching calls run without a prompt
Askpermissions.askMatching calls need confirmation, even if an allow also matches
Deniedpermissions.deny, --disallowedToolsMatching calls never run, in any mode

Rules are evaluated deny, then ask, then allow, and a call that would prompt reaches a person unless the mode is dontAsk.

Rules are evaluated deny, then ask, then allow, and a call that would prompt reaches a person unless the mode is dontAskStarts at a tool. A tool not available in the session cannot be requested. A requested call is blocked when a deny rule matches, in every mode. Otherwise a call that matches an ask rule, or that no allow rule or mode approves, would prompt; in dontAsk mode it is auto-denied, and otherwise it reaches a person. A call approved by an allow rule or a mode runs without prompting.noyesyesnonoyesyesnoyesnoAvailable in thesession?Claude cannotrequest itDeny rulematches?Blocked, in everymodeAsk rule matches?Approved by anallow rule or amode?Runs withoutpromptingdontAsk mode?Auto-deniedReaches a person

Narrow pre-approval removes repeated prompts for a known operation; broad pre-approval removes the person from more calls than you may intend.

Architecture / decision scenario

A review workflow exposes Read, Edit and Bash, pre-approves Bash(git diff *), asks for Bash(git push *) and denies Bash(rm *); its MCP tools are reviewed separately because --tools does not cover them. Interactively, a diff runs without a prompt, a push reaches the reviewer, and a removal is blocked. Run unattended in dontAsk, the push is denied rather than silently approved, so publishing waits for a run with an approval path. A personal allow for rm cannot reopen what the project denies.

Common exam traps

  • Reading --allowedTools as the list of the only available tools.
  • Assuming --tools also restricts MCP tools.
  • Treating a narrower allow as an exception to a broad deny.
  • Treating dontAsk as approval of unresolved calls.
  • Assuming bypassPermissions overrides a deny rule.
  • Treating a prompt instruction as a permission rule.

What to remember

Availability, pre-approval, denial and human approval are four gates. Use --tools for exposure and permission rules for calls; deny beats ask, ask beats allow, and a deny at any level stands.

Knowledge check

References