ToolRegistration class
Wraps a Tool with registry metadata.
Constructors
- ToolRegistration({required Tool tool, required ToolCategory category, bool enabled = true, bool restricted = false, int executionCount = 0, double avgDurationMs = 0, DateTime? lastExecutedAt})
Properties
- avgDurationMs ↔ double
-
Running average execution duration in milliseconds.
getter/setter pair
- category → ToolCategory
-
Logical category.
final
- definition → ToolDefinition
-
Tool definition for API calls.
no setter
- enabled ↔ bool
-
Whether this tool is currently enabled.
getter/setter pair
- executionCount ↔ int
-
Total number of times this tool has been executed.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isExecutable → bool
-
Whether this tool can currently be executed.
no setter
- lastExecutedAt ↔ DateTime?
-
Timestamp of last execution.
getter/setter pair
- name → String
-
Tool name (delegates to inner tool).
no setter
- restricted ↔ bool
-
Whether this tool is currently restricted (e.g. during plan mode).
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tool → Tool
-
The underlying tool instance.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recordExecution(
Duration duration) → void - Update running average with a new sample.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited