ReceivedToolResult
data class ReceivedToolResult(val id: String?, val tool: String, val toolArgs: JSONObject, val toolDescription: String?, val output: String, val resultKind: ToolResultKind, val result: JSONElement?, val resultObject: Any? = null)(source)
Represents the result or response received from a tool operation.
Properties
Link copied to clipboard
The kind of result produced by the tool, indicating success, failure, or validation error.
Link copied to clipboard
The raw result object produced by the tool. This value will not survive serialization, hence it should be used with caution and is marked as @InternalAgentsApi.
Link copied to clipboard
An optional description of the tool's functionality.
Functions
Link copied to clipboard
Converts the current ReceivedToolResult instance into a MessagePart.Tool.Result object.
Link copied to clipboard
fun <TResult> ReceivedToolResult.toSafeResult(tool: ToolBase<*, TResult>, serializer: JSONSerializer): SafeTool.Result<TResult>
Converts a ReceivedToolResult instance into a SafeTool.Result for safer result handling.