Hermes.Client.Operation (hermes_mcp v0.14.1)
Represents an operation to be performed by the MCP client.
This struct encapsulates all information about a client API call:
method- The MCP method to callparams- The parameters to send to the serverprogress_opts- Progress tracking options (optional)timeout- The timeout for this specific operation (default: 30 seconds)
Summary
Functions
Creates a new operation struct.
Types
@type t() :: %Hermes.Client.Operation{ headers: map() | nil, method: String.t(), params: map(), progress_opts: progress_options() | nil, timeout: pos_integer() }
Functions
@spec new(%{ :method => String.t(), optional(:params) => map(), optional(:progress_opts) => progress_options() | nil, optional(:timeout) => pos_integer(), optional(:headers) => map() }) :: t()
Creates a new operation struct.
Parameters
attrs- Map containing the operation attributes:method- The MCP method name (required):params- The parameters to send to the server (required):progress_opts- Progress tracking options (optional):timeout- The timeout for this operation in milliseconds (optional, defaults to 30s):headers- HTTP headers to send with this request (optional, only for StreamableHTTP transport)