GenAI.Tool.Registry
(GenAI Core v0.3.4)
Copy Markdown
Immutable registry that gives heterogeneous tool sources one deterministic model-facing namespace.
Names are exposed as source__tool by default. Invalid characters become
_; collisions fail with {:error, {:tool_name_collision, name}} unless the
caller explicitly selects collision: :keep or collision: :replace.
Summary
Functions
Executes a normalized call through its owning source.
Returns the registered model-facing names in deterministic order.
Registers and snapshots the current tools from a source.
Returns model-facing GenAI.Tool values in deterministic name order.
Types
Functions
@spec execute(t(), term(), term(), keyword()) :: {:ok, GenAI.Tool.Result.t()} | {:error, GenAI.Tool.Result.t() | term()}
Executes a normalized call through its owning source.
Returns the registered model-facing names in deterministic order.
Registers and snapshots the current tools from a source.
@spec tools(t()) :: [GenAI.Tool.t()]
Returns model-facing GenAI.Tool values in deterministic name order.