Skip to content

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 ​

PropertyTypeDescriptionDefined in
contentContentBlock[]Result content (tool results are ContentBlock[] for rich output)packages/shared/src/tools.ts:115
error?stringError message if success is falsepackages/shared/src/tools.ts:117
executedBy?ToolExecutorWho executed this toolpackages/shared/src/tools.ts:119
id?stringOptional unique ID for the result itselfpackages/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
namestringTool namepackages/shared/src/tools.ts:111
successbooleanWhether execution succeededpackages/shared/src/tools.ts:113
toolUseIdstringID of the tool call this result is for (matches ToolCall.id)packages/shared/src/tools.ts:109

Released under the MIT License.