McpTaskContext class

The task whose work is running (see Server.currentTask).

Properties

hashCode → int
The hash code for this object.
no setterinherited
record → McpTaskRecord
The task.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
taskId → String
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestInput(Map<String, Map<String, dynamic>> requests) → Future<Map<String, dynamic>>
Ask the requestor for input and wait for the answers, keyed like requests (each an elicitation/create, sampling/createMessage or roots/list request). On a 2025-11-25 task the requests go to the client tagged with the task while it is input_required; on an extension task they are offered as inputRequests and answered with tasks/update (keys must be new for this task).
setStatusMessage(String message) → void
Change the task's status message (and its lastUpdatedAt).
toString() → String
A string representation of this object.
inherited

Operators

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