Skip to content
2 min read · 367 words

Interface: TurnToolCallContent

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 | | ------------------------------------------------ | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ----------------- | ----- | ------------------------------------------------------------------------------------------------- | | args | unknown | Arguments the model supplied for the tool call. | | checksum | string | Integrity checksum over tool and args; can be used to detect tampering before execution. | | completedAt? | DateTime<boolean> | Timestamp when the tool call completed (successfully or not). | | createdAt | DateTime | Timestamp when this tool call was first emitted. | | id | string | Stable identifier for this tool call; correlates the initial request with its result. | | isComplete | boolean | true once the tool call has finished (successfully or not). | | isError | boolean | true when the tool execution produced an error; inspect results for detail. | | 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 | | tool | string | Name of the tool the model has requested. | | updatedAt | DateTime | Timestamp of the most recent update to this tool call (e.g. when results arrived). |