Interface: TurnToolCallContent
Defined in: lib/types/turn_runner.ts:56
A tool call invocation emitted during a turn, including its result once available.
Remarks
Emitted at least once when the model requests a tool call. The same id is re-emitted with results populated and isComplete set to true after the tool has been executed. If execution fails, isError is true and results contains the error detail.
Properties
| Property | Type | Description | Defined in | | ------------------------------------------------ | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------- | ----- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | | args | unknown | Arguments the model supplied for the tool call. | lib/types/turn_runner.ts:66 | | checksum | string | sha256({ tool, args }) over the raw arguments. Doubles as the cross-bus join key: equal to ToolExecutionStartEvent.callId / ToolExecutionEndEvent.callId and to @nhtio/adk!ToolCall.checksum. Collides by design for identical (tool, args) within a turn — that is what @nhtio/adk!DispatchContext.toolCallCount counts — so order or disambiguate repeated calls by createdAt / updatedAt, not by checksum alone. | lib/types/turn_runner.ts:74 | | completedAt? | DateTime<boolean> | Timestamp when the tool call completed (successfully or not). | lib/types/turn_runner.ts:102 | | createdAt | DateTime | Timestamp when this tool call was first emitted. | lib/types/turn_runner.ts:76 | | id | string | Stable stream id for this tool call; ties the initial request to its result on this bus (the announce emission and the completion emission share it). This is the model/stream id, not a cross-bus key — to correlate with the observability toolExecution* events, use checksum. | lib/types/turn_runner.ts:62 | | isComplete | boolean | true once the tool call has finished (successfully or not). | lib/types/turn_runner.ts:98 | | isError | boolean | true when the tool execution produced an error; inspect results for detail. | lib/types/turn_runner.ts:100 | | results? | unknown | Result returned by the tool, or error detail when isError is true. Absent until execution completes. Remarks Shape depends on the underlying tool kind. For a normal @nhtio/adk!Tool call, this carries one or more @nhtio/adk!SpooledArtifact instances (single artifact or SpooledArtifact[]) wrapping the bytes returned by the handler, or one or more @nhtio/adk!Media instances (single Media or Media[]) when the handler took the explicit-modality return path. For an @nhtio/adk!ArtifactTool call, this is the raw string the handler emitted (Tokenizable.toString()-equivalent) — already the model-visible answer. Type stays unknown to keep this event payload narrow; the underlying ToolCall.results is Tokenizable | SpooledArtifact | SpooledArtifact[] | Media | Media[]. See @nhtio/adk!ToolCall.results | lib/types/turn_runner.ts:96 | | tool | string | Name of the tool the model has requested. | lib/types/turn_runner.ts:64 | | updatedAt | DateTime | Timestamp of the most recent update to this tool call (e.g. when results arrived). | lib/types/turn_runner.ts:78 |