ToolResultBlock

The result of a tool invocation, delivered in a user turn.

Usage

Source

ToolResultBlock(
    tool_use_id,
    content,
    is_error,
    is_async=False,
)

Parameter Attributes

tool_use_id: ToolUseId
content: str
is_error: bool
is_async: bool = False

Attributes

tool_use_id: ToolUseId

The id of the originating tool-use block.

content: str

The result text, flattened from string or block content.

is_error: bool

Whether the tool reported a failure.

is_async: bool
Whether the originating tool ran asynchronously, read from the entry-level toolUseResult.isAsync marker.