A handle for an asynchronous tool call or subscription.
McpHouse.Client.start_tool_call/4 returns this handle directly.
McpHouse.Client.subscribe/4 returns it in an {:ok, operation} tuple.
The process that starts the operation owns its lifetime. Use await/2
to collect its result and cancel/1 to request cancellation. These
functions are also available through McpHouse.Client.
Summary
Functions
Collects the operation's terminal result.
Requests cancellation and sends a protocol cancellation signal when applicable.
Returns a specification to start this module under a supervisor.
Types
Functions
Collects the operation's terminal result.
The timeout is in milliseconds and defaults to 5,000. Pass :infinity
to wait without a limit. A wait timeout returns {:error, :await_timeout}
and leaves the operation running. Collect a terminal result once.
Requests cancellation and sends a protocol cancellation signal when applicable.
Returns :ok for a successful cancellation or an already closed
operation. Cancellation can return an error if sending the notification
or cleaning up the stream fails. Use await/2 to collect the terminal
result.
Returns a specification to start this module under a supervisor.
See Supervisor.