# `Alloy.Tool.Registry`
[🔗](https://github.com/alloy-ex/alloy/blob/v0.12.4/lib/alloy/tool/registry.ex#L1)

Builds tool schemas and function maps from tool definitions.

Takes a list of modules implementing `Alloy.Tool` and/or
`Alloy.Tool.Inline` structs (see `Alloy.Tool.inline/1`) and produces:
1. Tool definitions (JSON Schema format for providers)
2. A dispatch map from tool name → module or inline struct

# `tool`

```elixir
@type tool() :: module() | Alloy.Tool.Inline.t()
```

# `build`

```elixir
@spec build([tool()]) :: {[map()], %{required(String.t()) =&gt; tool()}}
```

Build tool definitions and dispatch map from a list of tools.

Each entry is either a module implementing `Alloy.Tool` or an
`Alloy.Tool.Inline` struct. Returns `{tool_defs, tool_fns}` where:
- `tool_defs` is a list of maps suitable for provider APIs
- `tool_fns` maps tool name strings to their implementing tool

---

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