executeTool

open suspend override fun executeTool(toolCall: Message.Tool.Call): ReceivedToolResult(source)

Executes a single tool call and returns its result.

The execution follows this process:

  1. If the prompt executor is a MockLLMExecutor, check for matching mocked tool actions

  2. If a matching mock is found, use it to generate the result

  3. Otherwise, retrieve the actual tool from the registry and execute it

Return

A ReceivedToolResult containing the result of the tool call

Parameters

toolCall

The tool call to execute