ToolCallRepairContext class
The argument a RepairToolCall hook receives: one invalid tool call plus everything needed to ask a model to fix it.
Built by the core from the same prompt and options the call was generated with, so tools, messages and instructions are exactly what the model saw — the host never re-derives them.
Constructors
-
ToolCallRepairContext({required RawToolCall toolCall, Object? error, Map<
String, dynamic> ? inputSchema, List<Tool> tools = const [], List<ModelMessage> messages = const [], String? instructions}) -
const
-
ToolCallRepairContext.fromJson(Map<
String, dynamic> json) -
factory
Properties
- error → Object?
-
The lookup, parse or validation failure, externally tagged
(
{"InvalidToolInput": {...}}). Weak type — same shape as ToolCall.error.final - hashCode → int
-
The hash code for this object.
no setterinherited
-
inputSchema
→ Map<
String, dynamic> ? -
The schema toolCall failed to satisfy; null when the tool is unknown.
final
- instructions → String?
-
The system instructions the call was generated with, if any.
final
-
messages
→ List<
ModelMessage> -
The messages the model saw.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- toolCall → RawToolCall
-
The invalid call, with the provider's raw argument text.
final
-
tools
→ List<
Tool> -
The full tool set the call was generated with.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited