Tools & Tasks
How Claude Code interacts with the world — executing commands, editing files, spawning agents, and managing work.
Tool System Overview
Tools are the AI's hands. Each tool provides a specific capability:
Shared from "Claude-Code" on Inkdown
How Claude Code interacts with the world — executing commands, editing files, spawning agents, and managing work.
Tools are the AI's hands. Each tool provides a specific capability:
tools.ts)The getTools(permissionContext) function assembles the active tool list:
isEnabled() checks (runtime feature gates)| Category | Tools |
|---|---|
| File Operations | FileRead, FileEdit, FileWrite, NotebookEdit, Glob, Grep |
| Shell | Bash, PowerShell |
| Web | WebFetch, WebSearch, WebBrowser |
| Task Management | TaskCreate, TaskGet, TaskUpdate, TaskList, TaskStop, TaskOutput |
| Agent/Swarm | Agent, TeamCreate, TeamDelete, SendMessage |
| Planning | EnterPlanMode, ExitPlanMode |
| User Interaction | AskUserQuestion |
| Organization | TodoWrite |
| Skills/Commands | SkillTool, ToolSearchTool |
| Worktrees | EnterWorktree, ExitWorktree |
| MCP | ListMcpResources, ReadMcpResource |
| Special | ConfigTool, TungstenTool, REPLTool, BriefTool, SleepTool |
| Cron | CronCreate, CronDelete, CronList |
| Testing | TestingPermissionTool (test-only) |
The most powerful and most dangerous tool. Executes shell commands.
Features:
&Permission modes:
default — asks for each commandyolo — auto-approves safe commands, asks for dangerous onesplan — read-only mode (no writes, no destructive commands)Edits files with surgical precision using SEARCH/REPLACE blocks.
Features:
Reads file contents with optional line ranges.
Features:
Writes complete file contents.
Features:
Fast file search using ripgrep and find/bfs.
Features:
Searches the web via Anthropic's web search API.
Fetches content from a URL.
Features:
Asks the user a clarifying question.
Features:
Manages a todo list visible in the UI.
Features:
Invokes skills (prompt-based capabilities from /skills/ directories).
Features:
The AgentTool lets the AI spawn a sub-agent to work on a task independently.
| Type | Description |
|---|---|
| LocalShell | Runs in a subprocess with shell access |
| LocalAgent | Runs in-process (lighter weight) |
| RemoteAgent | Runs on a remote machine |
| Dream | Background processing (auto-dream feature) |
| LocalWorkflow | Workflow script execution (feature-gated) |
| MonitorMcp | MCP monitoring task (feature-gated) |
Sub-agents get a restricted tool set:
tasks/)Tasks are the execution contexts for work. Each task type implements the Task interface:
| Tool | Purpose |
|---|---|
| TaskCreate | Create a new task |
| TaskGet | Get task details/result |
| TaskUpdate | Update task status/description |
| TaskList | List all tasks |
| TaskStop | Stop a running task |
| TaskOutput | Get streaming output from a task |
| Mode | Behavior |
|---|---|
| default | Ask for each tool use |
| yolo | Auto-approve safe tools, ask for dangerous ones |
| plan | Read-only (no writes, no destructive commands) |
| bypassPermissions | Auto-approve everything (sandbox only) |
utils/permissions/permissionSetup.ts)--tools, --dangerously-skip-permissions)Tool.ts)All tools extend/implement the Tool interface:
Ant-only tool that wraps the entire REPL inside a tool. Used for internal testing and debugging.
Ant-only tool for modifying settings programmatically.
Ant-only tool for internal debugging/diagnostics.
Generates a brief summary of the conversation (KAIROS feature).
Tells the AI to "sleep" until a condition is met (PROACTIVE/KAIROS feature).
Schedule recurring tasks (AGENT_TRIGGERS feature).
| File | Purpose |
|---|---|
src/tools.ts | Tool assembly, presets, merging |
src/Tool.ts | Tool base interface |
src/tasks.ts | Task type registry |
src/Task.ts | Task base interface |
src/tools/BashTool/ | Shell execution |
src/tools/FileEditTool/ | File editing (SEARCH/REPLACE) |
src/tools/FileReadTool/ | File reading |
src/tools/FileWriteTool/ | File writing |
src/tools/GrepTool/ | Regex search |
src/tools/GlobTool/ | Pattern matching |
src/tools/WebSearchTool/ | Web search |
src/tools/WebFetchTool/ | URL fetching |
src/tools/AskUserQuestionTool/ | User interaction |
src/tools/TodoWriteTool/ | Todo management |
src/tools/AgentTool/ | Sub-agent spawning |
src/tools/SkillTool/ | Skill invocation |
src/tools/TaskCreateTool/ | Task creation |
src/tools/TaskStopTool/ | Task termination |
src/tools/TaskOutputTool/ | Task output streaming |
src/tools/TeamCreateTool/ | Swarm team creation |
src/tools/TeamDeleteTool/ | Swarm team deletion |
src/tools/SendMessageTool/ | Inter-agent messaging |
src/tools/REPLTool/ | REPL wrapper (ant-only) |
src/tools/WorkflowTool/ | Workflow execution |
src/tools/LSPTool/ | Language Server Protocol |
src/tools/WebBrowserTool/ | Headless browser |
src/tools/ComputerUseTool/ | Screen capture & control |