ToolPart
@Serializable
@SerialName(value = "tool")
One tool invocation. id is the tool call id; input is the raw JSON arguments and output the tool result as text.
Constructors
Link copied to clipboard
constructor(id: String, name: String, state: ToolState = ToolState.INPUT_STREAMING, input: String = "", output: String? = null, errorText: String? = null, title: String? = null, preliminary: Boolean = false, subagent: Message? = null, kind: ToolKind = ToolKind.Function, source: String? = null, category: ToolCategory? = null, location: String? = null, approvalAnswers: ApprovalAnswers = ApprovalAnswers.All)
Properties
Link copied to clipboard
While ToolState.APPROVAL_REQUESTED: what the approval can answer besides yes / no.
Link copied to clipboard
What the call does to the world (ACP ToolKind); decides how a step is shown. Set upstream, like kind.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
output is an interim result that later updates will replace (AI SDK preliminary tool results).