AIDK API Reference / aidk-shared / ToolResult
Interface: ToolResult ​
Defined in: packages/shared/src/tools.ts:105
Tool result - represents the result of a tool execution.
Used in stream events and execution tracking.
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
content | ContentBlock[] | Result content (tool results are ContentBlock[] for rich output) | packages/shared/src/tools.ts:115 |
error? | string | Error message if success is false | packages/shared/src/tools.ts:117 |
executedBy? | ToolExecutor | Who executed this tool | packages/shared/src/tools.ts:119 |
id? | string | Optional unique ID for the result itself | packages/shared/src/tools.ts:107 |
metadata? | { [key: string]: unknown; cacheHit?: boolean; executionTimeMs?: number; retryCount?: number; } | Execution metadata for observability. | packages/shared/src/tools.ts:123 |
metadata.cacheHit? | boolean | - | packages/shared/src/tools.ts:126 |
metadata.executionTimeMs? | number | - | packages/shared/src/tools.ts:124 |
metadata.retryCount? | number | - | packages/shared/src/tools.ts:125 |
name | string | Tool name | packages/shared/src/tools.ts:111 |
success | boolean | Whether execution succeeded | packages/shared/src/tools.ts:113 |
toolUseId | string | ID of the tool call this result is for (matches ToolCall.id) | packages/shared/src/tools.ts:109 |