Conjure.ToolCall (Conjure v0.1.1-alpha)
View SourceRepresents a tool call from Claude's response.
When Claude uses a tool, the API response includes a tool_use content
block with an ID, tool name, and input parameters. This struct captures
that information for processing.
Example
A tool call from Claude's response:
%{
"type" => "tool_use",
"id" => "toolu_01ABC123",
"name" => "view",
"input" => %{"path" => "/path/to/file.txt"}
}Becomes:
%Conjure.ToolCall{
id: "toolu_01ABC123",
name: "view",
input: %{"path" => "/path/to/file.txt"}
}
Summary
Functions
Creates a ToolCall from a tool_use content block.
Gets an input parameter value.
Extracts the tool call ID.
Types
Functions
Creates a ToolCall from a tool_use content block.
Returns {:ok, tool_call} on success, or {:error, reason} if the
block is malformed.
Gets an input parameter value.
Extracts the tool call ID.