Calls a registered tool function with a decoded tool_use input map.
Arguments are matched to the function's parameters by name, in the order
the tool's entry declares.
Summary
Types
One dispatchable tool: its wire name, the function it calls, and that function's parameters in order.
Functions
Looks up name in entries and calls the matching function on module
with args (typically a Claudex.ContentBlock.ToolUse.input map).
Types
@type entry() :: %{ name: String.t(), function: atom(), params: [Claudex.Tool.Schema.param()] }
One dispatchable tool: its wire name, the function it calls, and that function's parameters in order.
Functions
Looks up name in entries and calls the matching function on module
with args (typically a Claudex.ContentBlock.ToolUse.input map).
A trailing optional parameter left out of args gets the function's own
default. An optional parameter left out while a later one is present
can't fall back to its default — Elixir can only skip defaults from the
end of the argument list — so it's called with nil instead; keep
optional tool parameters to the ones you're fine skipping that way.