Tool use content block for messages.
Represents a request to invoke a tool/action. This maps to the LLM's tool_use blocks and integrates with jido_action for execution.
Fields
id- Unique identifier for this tool invocation (used to correlate with ToolResult)name- The name of the tool/action to invokeinput- The input parameters for the tool as a map
Example
ToolUse.new("call_123", "get_weather", %{location: "San Francisco"})
#=> %ToolUse{type: :tool_use, id: "call_123", name: "get_weather", input: %{location: "San Francisco"}}
Summary
Types
Functions
Creates a new tool use content block.
Parameters
id- Unique identifier for this tool invocationname- The name of the tool/action to invokeinput- The input parameters for the tool (default: %{})
Examples
iex> ToolUse.new("call_1", "search", %{query: "elixir"})
%ToolUse{type: :tool_use, id: "call_1", name: "search", input: %{query: "elixir"}}
Returns the Zoi schema for ToolUse content