Agent
Spawns a sub-agent to complete a self-contained task. The sub-agent runs with its own tool access and conversation context. The parent agent waits for the sub-agent to complete and then receives a result. UseAgent when a task requires multiple steps that can be isolated — exploration, code analysis, test runs, or any work that benefits from a fresh context. For open-ended searches requiring multiple rounds of globbing or grepping, Agent is preferred over running the searches directly.
Sub-agents do not have access to
Agent by default (to prevent unbounded recursion). They also cannot use AskUserQuestion, TaskStop, ExitPlanMode, or EnterPlanMode.Inputs
The task description for the sub-agent. Provide enough context for the sub-agent to work independently — it does not share the parent’s conversation history.
Optional override for the sub-agent’s system prompt.
Output
Returns the sub-agent’s final response as a string. The sub-agent’s intermediate tool calls are shown in the UI as a grouped block.Multi-agent workflows
Agent is the building block for multi-agent orchestration. A coordinator agent can spawn multiple sub-agents in parallel, each working on a separate part of a problem. Sub-agents report their results back to the coordinator, which synthesizes the final response.
In coordinator mode, the coordinator’s tool access is limited to Agent, TaskStop, SendMessage, and output tools. All actual work is delegated to sub-agents.
TodoWrite
Creates and manages a structured todo list for the current session. Tracks task status and progress. Each call replaces the current todo list with the provided list. UseTodoWrite proactively for any task with 3 or more distinct steps. Mark tasks in_progress before starting them and completed immediately after finishing. Keep exactly one task in_progress at a time.
Inputs
The full updated todo list. Each item has:
content— imperative description of the task (for example,"Run tests")activeForm— present continuous form shown during execution (for example,"Running tests")status— one of"pending","in_progress", or"completed"
Output
The todo list before the update.
The todo list after the update.
When to use
UseTodoWrite when:
- A task requires 3 or more distinct steps
- The user provides multiple tasks (numbered list or comma-separated)
- The task requires careful planning across multiple operations
- You need to track progress to demonstrate thoroughness
TodoWrite for single, trivial tasks or purely conversational responses.
Task states
| State | Meaning |
|---|---|
pending | Not yet started |
in_progress | Currently being worked on (limit to one at a time) |
completed | Finished successfully |
TaskCreate
Creates a new task in the task list. Available to in-process teammates in multi-agent workflows.Inputs
A brief, actionable title for the task in imperative form (for example,
"Fix authentication bug in login flow").What needs to be done. Include enough detail for another agent to understand and complete the task if it will be assigned to a teammate.
Present continuous form shown in the spinner when the task is
in_progress (for example, "Fixing authentication bug"). If omitted, the subject is shown instead.Arbitrary key-value metadata to attach to the task.
Output
Identifier for the created task. Use this with
TaskGet, TaskUpdate, and TaskList.The subject of the created task.
pending and no owner.
TaskGet
Retrieves a task by ID. Returns the full task details including description, status, and dependency relationships.Inputs
The ID of the task to retrieve.
Output
Full task details, or
null if not found:id— task identifiersubject— task titledescription— full requirementsstatus—"pending","in_progress", or"completed"blocks— IDs of tasks waiting on this oneblockedBy— IDs of tasks that must complete before this one can start
Notes
- Verify that
blockedByis empty before beginning work on a task. - Use
TaskListto see all tasks in summary form before fetching individual task details.
TaskList
Lists all tasks in the task list with a summary of their current state. Use this to find available work, check overall progress, or identify blocked tasks.Output
Returns a summary of each task:Task identifier for use with
TaskGet and TaskUpdate.Brief description of the task.
"pending", "in_progress", or "completed".Agent name if assigned, empty if available.
List of open task IDs that must be resolved before this task can start. Tasks with entries in
blockedBy cannot be claimed.Teammate workflow
When working as a teammate in a multi-agent swarm:- After completing your current task, call
TaskListto find available work. - Look for tasks with
status: "pending", noowner, and emptyblockedBy. - Prefer tasks with lower IDs — earlier tasks often set up context for later ones.
- Claim an available task using
TaskUpdate(setownerto your agent name).
TaskUpdate
Updates a task’s status, owner, description, dependencies, or other fields. Available to in-process teammates in multi-agent workflows.Inputs
The ID of the task to update.
New status for the task. Valid values:
"pending", "in_progress", "completed", "deleted". Setting "deleted" permanently removes the task.New title for the task.
New description for the task.
Present continuous form shown in the spinner when the task is
in_progress.Agent name to assign the task to. Used to claim available tasks in a multi-agent swarm.
Task IDs that cannot start until this task completes.
Task IDs that must complete before this task can start.
Metadata keys to merge into the task. Set a key to
null to remove it.Status workflow
status: "deleted" permanently removes the task from the list.
Example inputs
TaskStop
Stops a running background task by ID.Inputs
The ID of the background task to stop.
Output
Returns a success or failure status indicating whether the task was stopped.MCPTool
Calls a tool on a connected MCP (Model Context Protocol) server. The tool name, input schema, and description are provided by the MCP server at connection time — theMCPTool is a generic wrapper that is instantiated once per registered MCP tool.
Each MCP tool appears in Claude’s tool list with its own name and schema as defined by the server. Claude calls it using the same inputs the server declared.
Inputs
MCP tools use passthrough input validation — they accept any object matching the schema declared by the MCP server. The specific fields depend on the tool provided by the server.Output
Returns the MCP tool’s execution result as a string.Permission requirements
Every MCP tool call requires a permission prompt. Claude presents the tool name and inputs before executing. You can approve individual calls or set allow rules for specific tool-and-input combinations.Notes
- MCP tools are only available when a compatible MCP server is connected to the session.
- If an MCP-provided web fetch tool is available, Claude will prefer it over the built-in
WebFetchtool. - The
MCPToolitself cannot be used directly — it is instantiated per MCP tool via the MCP client at runtime.
How these tools enable complex workflows
These tools work together to let Claude handle tasks that exceed a single sequential conversation:Single-session task tracking with TodoWrite
Single-session task tracking with TodoWrite
For tasks with multiple steps,
TodoWrite gives Claude and the user a shared view of what has been done and what remains. Claude updates task states in real time: marking items in_progress before starting and completed immediately after finishing. This makes it straightforward to resume work if interrupted.Isolated sub-tasks with Agent
Isolated sub-tasks with Agent
When part of a task can be done in isolation (code exploration, running a test suite, generating a file),
Agent spawns a sub-agent with its own context. This avoids polluting the main conversation with intermediate steps and allows multiple sub-tasks to run in parallel.Multi-agent coordination with Task tools
Multi-agent coordination with Task tools
In multi-agent workflows, a coordinator creates tasks using
TaskCreate, assigns them to teammates via TaskUpdate, and tracks overall progress using TaskList. Teammates use TaskGet to fetch their assignment, TaskUpdate to claim and complete it, and TaskList to find the next available task after finishing.External tool integration with MCPTool
External tool integration with MCPTool
MCP servers extend Claude’s tool set without requiring changes to Claude itself. A connected MCP server can expose database queries, CI/CD integrations, internal APIs, or any other capability as a callable tool. Claude discovers these tools at session start and calls them the same way as built-in tools.