Sycophant.ToolCall (sycophant v0.5.0)

Copy Markdown

Represents a tool invocation requested by the LLM.

When an LLM decides to use a tool, it returns one or more ToolCall structs in response.tool_calls. Each contains a provider-assigned :id, the tool :name, and the parsed :arguments map.

Examples

%Sycophant.ToolCall{id: "call_abc", name: "get_weather", arguments: %{"city" => "Paris"}}

Summary

Types

t()

@type t() :: %Sycophant.ToolCall{
  __type__: binary(),
  arguments: any(),
  id: binary(),
  metadata: any(),
  name: binary()
}

Functions

t()