AgentToolResult

data class AgentToolResult(val successful: Boolean, val errorMessage: String? = null, val result: JsonElement? = null) : ToolResult.JSONSerializable<AIAgentTool.AgentToolResult> (source)

Represents the result of executing an agent tool operation.

Constructors

Link copied to clipboard
constructor(successful: Boolean, errorMessage: String? = null, result: JsonElement? = null)

Properties

Link copied to clipboard
val errorMessage: String? = null

An optional error message describing the failure, if any.

Link copied to clipboard
val result: JsonElement? = null

An optional agent tool result.

Link copied to clipboard

Indicates whether the operation was successful.

Functions

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