Skip to main content

SamplingClient

Trait SamplingClient 

Source
pub trait SamplingClient: Send + Sync {
    // Required method
    fn create_message(
        &self,
        request: CreateMessageRequest,
    ) -> Pin<Box<dyn Future<Output = McpResult<CreateMessageResult>> + Send + '_>>;
}
Expand description

A client for making sampling requests to the MCP client.

Implementations handle the actual communication with the client.

Required Methods§

Source

fn create_message( &self, request: CreateMessageRequest, ) -> Pin<Box<dyn Future<Output = McpResult<CreateMessageResult>> + Send + '_>>

Send a sampling/createMessage request to the client.

Implementors§