executeSingleTool
inline suspend fun <ToolArg : ToolArgs, TResult : ToolResult> AIAgentFunctionalContext.executeSingleTool(tool: Tool<ToolArg, TResult>, toolArgs: ToolArg, doUpdatePrompt: Boolean = true): SafeTool.Result<TResult>(source)
Calls a specific tool directly using the provided arguments.
Return
The result of the tool execution.
Parameters
tool
The tool to execute.
toolArgs
The arguments to pass to the tool.
doUpdatePrompt
Specifies whether to add tool call details to the prompt.