BeforeToolCallResult class final

Result returned from BeforeToolCallHook.

Returning block: true prevents the tool from executing; the loop emits an error tool result with reason (or a default message) instead. Ported from pi's BeforeToolCallResult.

Constructors

BeforeToolCallResult({bool block = false, String? reason})
const

Properties

block bool
Whether to block execution of the tool call.
final
hashCode int
The hash code for this object.
no setterinherited
reason String?
Text of the error tool result emitted when block is true.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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