Skip to content

ToolResultBlockData

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

Data for a tool result block.

toolUseId: string;

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

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


status: "success" | "error";

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

Status of the tool execution.


content: ToolResultContentData[];

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

The content returned by the tool.


optional error: Error;

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

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