Resolves tool modules into the shape the provider + loop expect.
Consumers supply tools in one of two ways:
At config time:
config :ex_athena, tools: [MyApp.ToolA, MyApp.ToolB]Per-call:
ExAthena.Loop.run(messages, tools: [MyApp.ToolA, ExAthena.Tools.Read])
Per-call wins; the configured list is the default when no tools are passed.
Summary
Functions
List the builtin tool modules.
Build the prompt-friendly list used by ExAthena.ToolCalls.augment_system_prompt/2
when we fall back to the TextTagged protocol.
Build the provider-facing tool schema list — the same shape Ollama / OpenAI-compatible providers send on the wire.
Find the tool module that handles a call by name.
Resolve the tools to use for a call. Accepts
Validate that every module in modules implements the Tool behaviour.
Functions
@spec builtins() :: [module()]
List the builtin tool modules.
Build the prompt-friendly list used by ExAthena.ToolCalls.augment_system_prompt/2
when we fall back to the TextTagged protocol.
Build the provider-facing tool schema list — the same shape Ollama / OpenAI-compatible providers send on the wire.
Find the tool module that handles a call by name.
Resolve the tools to use for a call. Accepts:
- a list of modules
:all— every builtinnil— falls back toconfig :ex_athena, tools: ...or:all
@spec validate!([module()]) :: :ok
Validate that every module in modules implements the Tool behaviour.