AgentToolCallPart class final

One call to a tool: its input, its lifecycle and its result.

Maps the AI SDK's tool-<name> parts. A host renderer registered for name receives the whole part; other calls use the standard row.

Inheritance

Constructors

AgentToolCallPart({required String id, required String name, String? summary, String? description, String? detail, List<AgentToolInput> input = const [], AgentToolCallStatus status = AgentToolCallStatus.inputStreaming, String? output, Object? result, String? error, AgentApprovalDecision? decision, Duration? duration})
Creates a tool call part.
const

Properties

decision → AgentApprovalDecision?
The recorded approval decision, such as AgentApprovalDecision.allowOnce.
final
description → String?
Why the agent wants to make the call, shown when it asks for approval.
final
detail → String?
Compact outcome metadata, such as "31 tests".
final
duration → Duration?
How long the tool ran.
final
error → String?
What went wrong, when status is AgentToolCallStatus.failed.
final
hashCode → int
The hash code for this object.
no setteroverride
id → String
Stable identity of the call, such as the SDK's toolCallId.
final
input → List<AgentToolInput>
The call's labelled input values.
final
name → String
The tool's identifier, such as terminal.run.
final
output → String?
The tool's text output, shown in the output well.
final
result → Object?
The tool's structured result, for a host renderer. The standard row does not read it.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
status → AgentToolCallStatus
Where the call is in its lifecycle.
final
summary → String?
One line on what the call does or did, such as "Run the cart tests".
final

Methods

copyWith({String? summary, String? description, String? detail, List<AgentToolInput>? input, AgentToolCallStatus? status, String? output, Object? result, String? error, AgentApprovalDecision? decision, Duration? duration, bool clearSummary = false, bool clearDescription = false, bool clearDetail = false, bool clearOutput = false, bool clearResult = false, bool clearError = false, bool clearDecision = false, bool clearDuration = false}) → AgentToolCallPart
Returns a copy with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override