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 type of arguments required by the tool, extending Tool.Args
.
the type of result returned by the tool, implementing ToolResult
.
the tool to be executed.
the arguments required to execute the tool.
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 ToolResult.
Parameters
The name of the tool to be executed.
The arguments required to execute the tool, which must be a subtype of Tool.Args.
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 type of arguments required by the tool.
The type of result produced by the tool.
The class of the tool to be executed.
The arguments to be passed to the tool for its execution.
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, represented as an instance of Tool.Args
.