# `LlmToolkit.AgentResolver`
[🔗](https://github.com/fosferon/llm_toolkit/blob/v0.1.0/{path}#L{line})

Configurable tool resolver.

Host applications `use` this module with a `:tools` option listing their
tool handler modules. Each tool module must export:

  * `definition/0` → `LlmToolkit.Tool.t()`
  * `execute/2` → `(map(), map()) -> {:ok, String.t()} | {:error, String.t()}`
  * `sensitive_fields/0` → `[String.t()]` (optional)

The generated module implements `LlmToolkit.ToolResolver` and adds
context-aware `resolve/2` and `sensitive_fields_for/1` helpers.

## Example

    defmodule MyApp.Tools.Resolver do
      use LlmToolkit.AgentResolver, tools: [
        MyApp.Tools.FetchMoreValueInspirations
      ]
    end

## Error handling

Tool execution that raises is rescued, logged, and returned as
`{:error, "Tool execution failed: …"}`. This prevents a single buggy
tool from crashing the agent loop.

---

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