18 pages for canusetool.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
migration
Claude Developer Platform · in the page
managed-agents/migration
…on_mode` (typescript: `permissionMode`), `can_use_tool` (typescript: `canUseTool`) | Per-tool [`permission_policy` (java, php: `permissionPolicy`; csharp, go: `PermissionPolicy`)](https://platform.cla…
How the agent loop works
Claude Code CLI · in the page
agent-sdk/agent-loop
…s to them that need approval fall through to the permission mode and `canUseTool`. * **`disallowed_tools` / `disallowedTools`** blocks listed tools, regardless of other settings. See [Permissions](/do…
Configure your agent
Claude Code CLI · in the page
agent-sdk/configuration
…ved | [Configure permissions](/docs/en/agent-sdk/permissions.md) | | `canUseTool` | `can_use_tool` | Your approval callback for tool calls | [Handle tool approval requests](/docs/en/agent-sdk/user-inp…
Intercept and control agent behavior with hooks
Claude Code CLI · in the page
agent-sdk/hooks
…ion) once a permission request has waited about six seconds on your [`canUseTool` callback](/docs/en/agent-sdk/user-input). Requires TypeScript Agent SDK v0.3.233 or later, or Python Agent SDK v0.2.13…
Configure permissions
Claude Code CLI · in the page
agent-sdk/permissions
…ion modes and rules to define what's allowed automatically, and the [`canUseTool` callback](/docs/en/agent-sdk/user-input) to handle everything else at runtime. ## How permissions are evaluated When…
Agent SDK reference - Python
Claude Code CLI · in the page
agent-sdk/python
…ted stderr: Callable[[str], None] | None = None can_use_tool: CanUseTool | None = None hooks: dict[HookEvent, list[HookMatcher]] | None = None user: str | None = None include_parti…
Extend agents with skills
Claude Code CLI · in the page
agent-sdk/skills
…rs. For the full permission flow, including permission modes and the `canUseTool` callback, see [Permissions](/docs/en/agent-sdk/permissions.md). ## Troubleshooting ### Skills not found **Check set…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…on yet. Everything a claim can't set, such as `mcpServers`, `hooks`, `canUseTool`, `settingSources`, `systemPrompt`, and `plugins`, is fixed for the life of the spare, so keep one spare per distinct s…
Handle approvals and user input
Claude Code CLI · in the page
agent-sdk/user-input
…ying questions** (via the `AskUserQuestion` tool). Both trigger your `canUseTool` callback, which pauses execution until you return a response. This is different from normal conversation turns where C…
Environment variables
Claude Code CLI · in the page
env-vars
…ication) in sessions where Claude Code sends them to the Agent SDK's `canUseTool` callback, which is how Claude Desktop and the VS Code extension host Claude Code. Has no effect in terminal sessions.…
Run Claude Code programmatically
Claude Code CLI · in the page
headless
…s most when your run has a permission host: an Agent SDK app with a [`canUseTool` callback](/docs/en/agent-sdk/user-input), or an MCP tool you pass with [`--permission-prompt-tool`](/docs/en/cli-refer…
Hooks reference
Claude Code CLI · in the page
hooks
…mpts-in-unattended-runs) to receive the prompt, such as an Agent SDK `canUseTool` callback. A `PreToolUse` hook satisfies that requirement when it does the following: 1. Reads the tool's input from…
Connect Claude Code to tools via MCP
Claude Code CLI · in the page
mcp
…ction; not supported via --permission-prompt-tool`. The Agent SDK's [`canUseTool` callback](/docs/en/agent-sdk/permissions) does receive these calls and can approve them, because your SDK application…
Monitoring
Claude Code CLI · in the page
monitoring-usage
…itself fails. For example, that request fails when the Agent SDK's [`canUseTool`](/docs/en/agent-sdk/typescript#canusetool) callback or the [`--permission-prompt-tool`](/docs/en/cli-reference#cli-fla…
Choose a permission mode
Claude Code CLI · in the page
permission-modes
…pproval are denied unless you approve them with an allow rule, hook, `canUseTool` callback, or `--permission-prompt-tool`. To get these calls approved, add allow rules or start in auto mode: * **[Ad…
Configure permissions
Claude Code CLI · in the page
permissions
…ission-prompt-tool`](/docs/en/cli-reference#cli-flags) or Agent SDK [`canUseTool` callback](/docs/en/agent-sdk/user-input#handle-tool-approval-requests) would be asked about is still put to that tool…
Manage mods for your organization
Claude Code CLI · in the page
plugins/mods/admin
…ion-prompt-tool`](/docs/en/cli-reference#cli-flags) or an Agent SDK [`canUseTool` callback](/docs/en/agent-sdk/user-input#handle-tool-approval-requests). There the classifier checks the call first. Fo…
Orchestrate subagents at scale with dynamic workflows
Claude Code CLI · in the page
workflows
…-tool`](/docs/en/cli-reference#cli-flags) or, with the Agent SDK, a [`canUseTool`](/docs/en/agent-sdk/permissions) callback approves it. In the Desktop app, an approval card shows the workflow name,…