ToolResult

sealed interface ToolResult

Represents the result of executing a tool.

This sealed interface is used to categorize and store the outcome of a tool execution, which can either be a success or a failure. A result always contains the name of the tool that generated it.

Inheritors

Types

Link copied to clipboard
data class Failure(val toolName: String, val error: ToolException) : ToolResult

Represents a failure that occurred during the execution of a tool.

Link copied to clipboard
data class Success(val toolName: String, val value: Any, val serializer: KSerializer<out Any>) : ToolResult

Represents the successful execution result of a tool.

Properties

Link copied to clipboard
abstract val toolName: String