ToolCallPart

data class ToolCallPart(val id: String, val toolCallId: String, val name: String, val arguments: String = "", val parsedArguments: JsonElement? = null, val status: ToolCallStatus = ToolCallStatus.STREAMING_ARGUMENTS, val result: String? = null, val error: String? = null, val parentMessageId: String? = null, val encryptedValue: String? = null) : UiPart

A tool the agent asked for, and how far it has got.

Constructors

Link copied to clipboard
constructor(id: String, toolCallId: String, name: String, arguments: String = "", parsedArguments: JsonElement? = null, status: ToolCallStatus = ToolCallStatus.STREAMING_ARGUMENTS, result: String? = null, error: String? = null, parentMessageId: String? = null, encryptedValue: String? = null)

Properties

Link copied to clipboard

the JSON text assembled from TOOL_CALL_ARGS. A string rather than a parsed JsonElement because it is not valid JSON until the call ends -- it arrives one fragment at a time, and a renderer that wants to show arguments as they stream has to work with the fragment. ToolCallPart.parsedArguments is the parsed form, and is null until it parses.

Link copied to clipboard

the opaque blob a REASONING_ENCRYPTED_VALUE with subtype tool-call addressed to this call by entityId. Not renderable, and kept for the same reason ReasoningPart.encryptedValues is: a client that must echo it back to the agent still can.

Link copied to clipboard
Link copied to clipboard
open override val id: String

Stable across the whole life of the part, including while it streams.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val parsedArguments: JsonElement?
Link copied to clipboard

the tool's output, once a TOOL_CALL_RESULT names this call. Its shape is the tool's own business, so it is left as the string the protocol carries.

Link copied to clipboard
Link copied to clipboard