execute_tools


Description:

public virtual async ArrayList<Message> execute_tools (ArrayList<ToolCall> tool_calls)

Executes all tool calls and returns tool reply messages.

Called by Chat when tool calls are detected. Agent handler manages tool execution flow including: - Iterating through all tool calls - Tool lookup and validation - UI messages (execution start, errors) - Tool execution - Creating tool reply messages - Error handling (creates tool_call_fail message on error, continues with next tool)

Parameters:

tool_calls

The list of tool calls to execute

Returns:

Array of tool reply messages (tool_reply or tool_call_fail messages)