Hermes.Client.Operation (hermes_mcp v0.9.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
Functions
@spec new(%{ :method => String.t(), optional(:params) => map(), optional(:progress_opts) => progress_options() | nil, optional(:timeout) => pos_integer() }) :: 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)