ReceivedToolResult
data class ReceivedToolResult(val id: String?, val tool: String, val toolArgs: JSONObject, val toolDescription: String?, val content: String, val resultKind: ToolResultKind, val result: JSONElement?)(source)
Represents the result or response received from a tool operation.
Constructors
Link copied to clipboard
constructor(id: String?, tool: String, toolArgs: JSONObject, toolDescription: String?, content: String, resultKind: ToolResultKind, result: JSONElement?)
constructor(id: String?, tool: String, toolArgs: JsonObject, toolDescription: String?, content: String, resultKind: ToolResultKind, result: JsonElement?)
Properties
Functions
Link copied to clipboard
Converts the current ReceivedToolResult instance into a Message.Tool.Result object.
Link copied to clipboard
fun <TResult> ReceivedToolResult.toSafeResult(tool: Tool<*, TResult>, serializer: JSONSerializer): SafeTool.Result<TResult>
Converts a ReceivedToolResult instance into a SafeTool.Result for safer result handling.