# `AshAi.Tool.Builder`
[🔗](https://github.com/ash-project/ash_ai/blob/v0.6.1/lib/ash_ai/tool/builder.ex#L5)

Builds ReqLLM.Tool structs and callbacks from AshAi.Tool DSL entities.

This module is responsible for converting AshAi tool definitions into
the format expected by ReqLLM, including generating the parameter schema
and creating the callback function that executes the tool.

# `build`

Builds a ReqLLM.Tool struct and callback function from an AshAi.Tool definition.

Returns a tuple of `{ReqLLM.Tool, callback_fn}` where:
- `ReqLLM.Tool` contains the tool schema for the LLM
- `callback_fn` is a function/2 that takes (arguments, context) and executes the Ash action

## Example

    {tool, callback} = AshAi.Tool.Builder.build(tool_def)
    result = callback.(%{"input" => %{"name" => "foo"}}, %{actor: current_user})

---

*Consult [api-reference.md](api-reference.md) for complete listing*
