Result

class Result(val result: Any?, val type: KType, val json: Json) : ToolResult(source)

Represents the result of a tool operation, encapsulating the value of the result, its type, and the JSON serialization logic.

Constructors

Link copied to clipboard
constructor(result: Any?, type: KType, json: Json)

Properties

Link copied to clipboard
val json: Json

The JSON configuration used for serialization and deserialization.

Link copied to clipboard
val result: Any?

The actual result value produced.

Link copied to clipboard
val type: KType

The Kotlin type of the result value.

Functions

Link copied to clipboard
open override fun toStringDefault(): String

Converts the encapsulated result into a JSON string representation using the specified serializer and type.