A tool call chunk from a streaming response.
Emitted when the model decides to call a tool. During streaming, tool call
arguments arrive incrementally. The library accumulates them internally and
only emits a chunk when complete: true.
Fields
:id— unique identifier for this tool call (used in tool result messages):name— the tool name to call:arguments— decoded arguments map (complete whencomplete: true):index— position index for multiple simultaneous tool calls:complete— whether this chunk contains the full tool call (alwaystruewhen emitted)
Example
%LLM.Stream.ToolCall{
id: "call_abc123",
name: "get_weather",
arguments: %{"location" => "San Francisco"},
index: 0,
complete: true
}
Summary
Types
@type t() :: %LLM.Stream.ToolCall{ arguments: map(), complete: boolean(), id: String.t(), index: non_neg_integer(), name: String.t() }