The type of the tool call.
The AI message that initiated this tool call.
The tool call from the AI message.
Unique identifier for this tool call. Uses the tool call's id if available, otherwise generates one from aiMessage.id and index.
Index of this tool call within the AI message's tool_calls array.
The result message from tool execution.
undefined if the tool is still being executed or no result was received.
The current lifecycle state of the tool call.
pending: No result yetcompleted: Has result with success statuserror: Has result with error status
Represents a tool call paired with its result. Useful for rendering tool invocations and their outputs together.