session/update notifications, allowing Clients to display real-time progress and results to users.
While Agents handle the actual execution, they may leverage Client capabilities like permission requests or file system access to provide a richer, more integrated experience.
Creating
When the language model requests a tool invocation, the Agent SHOULD report it to the Client:ToolCallId
required
A unique identifier for this tool call within the session
string
required
A human-readable title describing what the tool is doing
ToolKind
The category of tool being invoked.Tool kinds help Clients choose appropriate icons and optimize how they display tool execution progress.
ToolCallStatus
The current execution status (defaults to
pending)ToolCallContent[]
Content produced by the tool call
ToolCallLocation[]
File locations affected by this tool call
object
The raw input parameters sent to the tool
object
The raw output returned by the tool
Updating
As tools execute, Agents send updates to report progress and results. Updates use thesession/update notification with tool_call_update:
toolCallId are optional in updates. Only the fields being changed need to be included.
Requesting Permission
The Agent MAY request permission from the user before executing a tool call by calling thesession/request_permission method:
SessionId
required
The session ID for this request
ToolCallUpdate
required
The tool call update containing details about the operation
PermissionOption[]
required
Available permission options for the user to choose
from
"cancelled" outcome:
RequestPermissionOutcome
required
The user’s decision, either: -
cancelled - The prompt turn was
cancelled - selected with an
optionId - The ID of the selected permission optionPermission Options
Each permission option provided to the Client contains:string
required
Unique identifier for this option
string
required
Human-readable label to display to the user
PermissionOptionKind
required
A hint to help Clients choose appropriate icons and UI treatment for each option.
allow_once- Allow this operation only this timeallow_always- Allow this operation and remember the choicereject_once- Reject this operation only this timereject_always- Reject this operation and remember the choice
Status
Tool calls progress through different statuses during their lifecycle:The tool call hasn’t started running yet because the input is either streaming
or awaiting approval
The tool call is currently running
The tool call completed successfully
The tool call failed with an error
Content
Tool calls can produce different types of content:Regular Content
Standard content blocks like text, images, or resources:Diffs
File modifications shown as diffs:string
required
The absolute file path being modified
string
The original content (null for new files)
string
required
The new content after modification
Terminals
Live terminal output from command execution:string
required
The ID of a terminal created with
terminal/createLearn more about Terminals
Following the Agent
Tool calls can report file locations they’re working with, enabling Clients to implement “follow-along” features that track which files the Agent is accessing or modifying in real-time.string
required
The absolute file path being accessed or modified
number
Optional line number within the file