AgentToolException class final
A refused tool call.
Thrown rather than returned because a tool's body is ordinary Dart, and the alternative — every step returning a result union — would put the refusal check at every call site inside the tool rather than at its edge.
- Implemented types
Constructors
- AgentToolException(AgentToolErrorCode code, String message, {String? argument, int? step, String? auditReason, AgentScopeGate? gate})
-
const
Properties
- argument → String?
-
The offending argument, when one argument is at fault.
final
- auditReason → String
-
What the audit records as the deny reason.
no setter
- code → AgentToolErrorCode
-
final
- gate → AgentScopeGate?
-
The guard gate behind the refusal, or null when no gate refused it.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- step → int?
-
The 1-based step that failed, for a call or a run whose steps are the
mutations it applied: one past the number it applied before it stopped.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, Object?> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited