Skip to content

ToolResultBlockData

Defined in: src/types/messages.ts:287

Data for a tool result block.

toolUseId: string;

Defined in: src/types/messages.ts:291

The ID of the tool use that this result corresponds to.


status: "success" | "error";

Defined in: src/types/messages.ts:296

Status of the tool execution.


content: ToolResultContentData[];

Defined in: src/types/messages.ts:301

The content returned by the tool.


optional error: Error;

Defined in: src/types/messages.ts:308

The original error object when status is ‘error’. Available for inspection by hooks, error handlers, and agent loop. Tools must wrap non-Error thrown values into Error objects.