Tool class

Constructors

Tool({bool? activated, String? description, bool? dispatchable, Object? inputSchema, String? name, Price? price, String? source_})
Returns a new Tool instance.

Properties

activated ↔ bool?
Activated is filled by the registry from the activation store for the requesting (org,project); providers leave it zero. An unactivated tool is discoverable but refused 403 at dispatch.
getter/setter pair
description ↔ String?
Description is the prose a model reads to decide whether to call the tool.
getter/setter pair
dispatchable ↔ bool?
Dispatchable is whether the tool can be CALLED. False for a listing-only entry: a skill is activated and attached to an agent, never called.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
inputSchema ↔ Object?
getter/setter pair
name ↔ String?
Name is the tool's id in the flat, fleet-wide tool namespace — the value a tools/call passes. Unique across sources: a collision is resolved by source precedence before the caller ever sees it.
getter/setter pair
price ↔ Price?
Price is what a call costs and who is paid, absent for a free tool. Enforcement is the x402 settlement client; this is the declaration.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
source_ ↔ String?
Source is where the tool comes from: connector, function, zap-service, agent, skill or mcp.
getter/setter pair

Methods

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.
override

Operators

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

Static Methods

fromJson(dynamic value) → Tool?
Returns a new Tool instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Tool>
mapFromJson(dynamic json) → Map<String, Tool>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Tool>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.