ToolContext class

Conversation-aware context for custom tools.

wraps a Connection and exposes conversation capabilities — identity, idle state, message injection, and a per-conversation key-value store — to tools.

Constructors

ToolContext(Connection _connection)
Creates a new ToolContext instance wrapping the given connection.

Properties

connection Connection
Returns the active connection.
no setter
conversationId String
Returns the conversation identifier.
no setter
hashCode int
The hash code for this object.
no setterinherited
isIdle bool
Returns true if the connection is idle.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getState(String key, [dynamic defaultValue]) → dynamic
Retrieves a value from the per-conversation state store.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(String message) Future<void>
Sends an asynchronous trigger notification to the conversation.
setState(String key, dynamic value) → void
Stores a value in the per-conversation state store.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited