Validates parsed tool calls against available tool definitions.
Checks that each tool call's name exists in ctx.tools. Calls to
unknown tools are removed from tool_calls and converted to error
results so the LLM can self-correct in the next iteration.
Optionally validates arguments via LlmCore.Tool.Validator when
the tool definition includes parameter schemas.
Skips processing when the decision is already :done (no tool calls)
or when the pipeline is in error status.
Summary
Functions
Validates tool calls against available tool definitions.
Functions
@spec call( LlmCore.Agent.Context.t(), keyword() ) :: LlmCore.Agent.Context.t()
Validates tool calls against available tool definitions.
Unknown tools produce error results that are fed back to the LLM. Tools with invalid arguments (per JSON Schema) also produce error results.
Parameters
ctx—%Context{}withtool_callsandtoolsopts— ALF stage options (unused)
Returns
Updated %Context{} with validated tool_calls, error tool_results
for invalid calls, and any validation_errors.