ReadonlytypeDiscriminator for tool result content.
ReadonlytoolThe ID of the tool use that this result corresponds to.
ReadonlystatusStatus of the tool execution.
ReadonlycontentThe content returned by the tool.
Optional ReadonlyerrorThe 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.
Serializes the ToolResultBlock to a JSON-compatible ContentBlockData object. Called automatically by JSON.stringify(). Note: The error field is not serialized (deferred for future implementation).
StaticfromCreates a ToolResultBlock instance from its wrapped data format.
Wrapped ToolResultBlockData to deserialize
ToolResultBlock instance
Tool result content block.