RawToolCall class

A tool call as the model emitted it: input is the provider's raw argument text, not a decoded object.

Both the call handed to a RepairToolCall hook (ToolCallRepairContext.toolCall) and the replacement it returns. The replacement is re-parsed and re-validated against the tool's schema, so input must be the argument text the tool expects (usually a JSON object literal); returning text that still fails validation leaves the call invalid, now carrying a ToolCallRepairError.

Constructors

RawToolCall({required String toolCallId, required String toolName, required String input, bool? providerExecuted, bool? isDynamic, String? thoughtSignature, dynamic providerMetadata})
const
RawToolCall.fromJson(Map<String, dynamic> json)
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
input → String
The provider's raw argument text (e.g. '{"city":"Singapore"}').
final
isDynamic → bool?
Whether the call targets a dynamic tool. dynamic is a Dart built-in identifier, so the field is isDynamic and maps to the dynamic key.
final
providerExecuted → bool?
Whether the provider executes the call itself. The core adopts the replacement as returned, so a hook must carry this over (as copyWith does) or the call turns into a client-executed one.
final
providerMetadata → dynamic
Additional provider-specific metadata associated with this call.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
thoughtSignature → String?
Provider-assigned thought signature (e.g. Gemini thoughtSignature), echoed back verbatim on the next turn.
final
toolCallId → String
final
toolName → String
final

Methods

copyWith({String? toolCallId, String? toolName, String? input}) → RawToolCall
A copy with input (and optionally the id or name) replaced and every provider field kept — the usual shape of a repair.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

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