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§
Sourcefn create_message(
&self,
request: CreateMessageRequest,
) -> Pin<Box<dyn Future<Output = McpResult<CreateMessageResult>> + Send + '_>>
fn create_message( &self, request: CreateMessageRequest, ) -> Pin<Box<dyn Future<Output = McpResult<CreateMessageResult>> + Send + '_>>
Send a sampling/createMessage request to the client.