ToolCallUpdate class final
Represents an upsert for a tool call that the language model has requested.
Tool calls are actions that the agent executes on behalf of the language model, such as reading files, executing code, or fetching data from external sources.
Only ToolCallUpdate::tool_call_id is required. Other fields have patch semantics:
omitted fields leave the existing tool call value unchanged, null clears or
unsets the value, and concrete values replace the previous value. For
- Implemented types
- Annotations
-
- @JsonSerializable.new(createFactory: false, createToJson: false)
Constructors
-
ToolCallUpdate({required ToolCallId toolCallId, AcpPatch<
String> title = const AcpPatch<String>.unchanged(), AcpPatch<ToolKind> kind = const AcpPatch<ToolKind>.unchanged(), AcpPatch<ToolCallStatus> status = const AcpPatch<ToolCallStatus>.unchanged(), AcpPatch<List< content = const AcpPatch<List<ToolCallContent>>.unchanged(), AcpPatch<ToolCallContent> >List< locations = const AcpPatch<List<ToolCallLocation>>.unchanged(), AcpPatch<ToolCallLocation> >AcpJsonValue> rawInput = const AcpPatch<AcpJsonValue>.unchanged(), AcpPatch<AcpJsonValue> rawOutput = const AcpPatch<AcpJsonValue>.unchanged(), AcpJsonObject? meta}) - Creates a ToolCallUpdate value.
-
ToolCallUpdate.fromJson(Map<
String, Object?> json) -
Decodes a JSON object, discarding recoverable issues.
factory
Properties
-
content
→ AcpPatch<
List< ToolCallContent> > -
Content produced by the tool call.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
kind
→ AcpPatch<
ToolKind> -
The category of tool being invoked.
Helps clients choose appropriate icons and UI treatment.
final
-
locations
→ AcpPatch<
List< ToolCallLocation> > -
File locations affected by this tool call.
Enables "follow-along" features in clients.
final
- meta → AcpJsonObject?
-
The _meta property is reserved by ACP to allow clients and agents to attach additional
metadata to their interactions. Omitted means no metadata update;
nullis an explicit clear signal. Implementations MUST NOT make assumptions about values at these keys.final -
rawInput
→ AcpPatch<
AcpJsonValue> -
Raw input parameters sent to the tool.
final
-
rawOutput
→ AcpPatch<
AcpJsonValue> -
Raw output returned by the tool.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
status
→ AcpPatch<
ToolCallStatus> -
Current execution status of the tool call.
final
-
title
→ AcpPatch<
String> -
Human-readable title describing what the tool is doing.
final
- toolCallId → ToolCallId
-
Unique identifier for this tool call within the session.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toAcpJson(
) → AcpJsonObject -
Converts this protocol value to its immutable JSON representation.
override
-
toJson(
) → Map< String, Object?> - Encodes this value to its wire object.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
decode(
Object? json) → AcpDecoded< ToolCallUpdate> - Decodes this model and reports recoverable issues.