callTool
Executes the specified tool with the given arguments and returns the result within a SafeTool.Result wrapper.
Return
a SafeTool.Result containing the tool's execution result of type TResult.
Parameters
the tool to be executed.
the arguments required to execute the tool.
Type Parameters
the type of arguments required by the tool.
the type of result returned by the tool, implementing ToolResult.
Executes a tool by its name with the provided arguments.
Return
A SafeTool.Result containing the result of the tool execution, which is a subtype of ai.koog.agents.core.tools.ToolResult.
Parameters
The name of the tool to be executed.
The arguments required to execute the tool.
Executes a tool operation based on the provided tool class and arguments.
Return
A result wrapper containing either the successful result of the tool's execution or an error.
Parameters
The class of the tool to be executed.
The arguments to be passed to the tool for its execution.
Type Parameters
The type of arguments required by the tool.
The type of result produced by the tool.
Invokes a tool of the specified type with the provided arguments.
Return
A SafeTool.Result containing the outcome of the tool's execution, which may be of any type that extends ToolResult.
Parameters
The input arguments required for the tool execution.
Invokes a specified tool function within the AI Agent's write session context.
Return
The result of executing the specified tool function.
Parameters
The tool function to be executed.
The arguments to pass to the tool function.
Throws
If the tool corresponding to the given function is not found in the tool registry.