Tool definition helpers for function calling.
Provides utilities to define tools declaratively and convert Elixir functions to tool definitions.
Summary
Functions
Define a tool with a name, description, and parameters.
Create a tool definition from a function reference.
Create a tool definition from module, function name, and arity.
Convert a list that may contain functions to tool definitions.
Same as prepare/1 but raises on error.
Types
@type param_opts() :: [ type: param_type(), required: boolean(), description: String.t(), enum: [any()], default: any(), items: param_opts() ]
@type param_type() :: :string | :integer | :number | :boolean | :array | :object
Functions
Define a tool with a name, description, and parameters.
Create a tool definition from a function reference.
@spec from_mfa(module(), atom(), non_neg_integer()) :: {:ok, tool_def()} | {:error, term()}
Create a tool definition from module, function name, and arity.
Convert a list that may contain functions to tool definitions.
Same as prepare/1 but raises on error.