executeUnsafe

suspend fun executeUnsafe(args: Any?, serializer: JSONSerializer): SafeTool.Result<TResult>(source)

Executes a tool with the provided arguments in an unsafe manner. This method does not enforce type safety for the arguments provided to the tool.

Return

A Result containing the outcome of the tool execution with TResult as the result type.

Parameters

args

The arguments to be passed to the tool.

serializer

The JSON serializer for encoding the tool arguments.


suspend fun executeUnsafe(args: Any?, serializer: JSONSerializer, metadata: ToolCallMetadata): SafeTool.Result<TResult>(source)

Executes the tool with the provided arguments and metadata in an unsafe manner.

Return

A Result containing the outcome of the tool execution.

Parameters

args

The arguments to be passed to the tool.

serializer

The JSON serializer for encoding the tool arguments.

metadata

Caller-contributed per-call context.