AgentToolBinding<C extends AgentToolContext> class final

{invocation, registry} for one request, plus the context the calls run against.

Per request, never installed. A provider receives a binding on the request that may use it and holds it for that request only, so an invocation's scope and consent cannot outlive the action that granted them.

Implemented types

Constructors

AgentToolBinding({required C context, required AgentToolRegistry<C> registry})

Properties

context → C
final
declarations → List<ToolDescriptor>
The tool set as the contract declares tools — one descriptor per tool in registry, generated every time.
no setteroverride
failure → AgentRunStep?
The first call that was refused or failed, if any.
no setter
hashCode → int
The hash code for this object.
no setterinherited
invocation → AgentInvocation
no setter
registry → AgentToolRegistry<C>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
steps → List<AgentRunStep>
Every call made through dispatch, in order.
no setter

Methods

call(String name, Map<String, Object?> arguments) → Future<LlmToolAnswer>
Runs the call name with arguments and answers what the model is told — a refusal included, as an error answer.
override
dispatch(String name, Map<String, Object?> input) → Future<AgentToolResult>
Runs the call name with input and answers the full result.
nativeDeclarations() → List<Map<String, Object?>>
The tool set as native provider tool declarations — {name, description, input_schema}, the tool-use shape of the Anthropic Messages API. Generated from registry every time.
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