A provider-emitted tool call. See spec §5.3.
Layer A — pure serializable data. Carries the provider-assigned :id the
model uses to match the eventual tool-role message back to this call, the
:name of the tool to invoke, and the parsed :arguments map. The original
provider JSON is preserved on :raw_arguments so adapters that need the
exact wire string (streaming reassembly, audit logs) can recover it.
Summary
Types
Functions
Build a %ToolCall{} from keyword opts.
:id, :name, and :arguments are required; omitting any raises
ArgumentError via struct!/2. Optional fields: :raw_arguments,
:metadata.
Examples
iex> ALLM.ToolCall.new(id: "call_1", name: "weather", arguments: %{"city" => "SFO"})
%ALLM.ToolCall{id: "call_1", name: "weather", arguments: %{"city" => "SFO"}, raw_arguments: nil, metadata: %{}}