Connected-client handle for one remote MCP task.
This is intentionally different from %FastestMCP.BackgroundTask{}, which is
a local runtime handle. A remote client task is a view over a task owned by a
connected peer.
The flow is:
create task remotely
-> register the remote task handle in the client
-> wait on task notifications when available
-> fall back to tasks/get polling when needed
-> cache the final result payload
Summary
Functions
Signals cancellation to the remote task.
Fetches fresh task status from the remote peer and updates the cache.
Registers a callback for task status changes.
Fetches and caches the final task result.
Returns the last cached status, if any.
Supplies responses to outstanding input requests for this task.
Waits for the task to reach a target state or any terminal state.
Types
@type kind() :: :tool | :prompt | :resource | :generic
@type t() :: %FastestMCP.Client.Task{ client: FastestMCP.Client.t(), kind: kind(), target: String.t() | nil, task_id: String.t() }
Functions
Signals cancellation to the remote task.
Fetches fresh task status from the remote peer and updates the cache.
Registers a callback for task status changes.
Fetches and caches the final task result.
Returns the last cached status, if any.
Supplies responses to outstanding input requests for this task.
Waits for the task to reach a target state or any terminal state.