pub trait SamplingSender: Send + Sync {
// Required method
fn create_message(
&self,
request: SamplingRequest,
) -> Pin<Box<dyn Future<Output = McpResult<SamplingResponse>> + Send + '_>>;
}Expand description
Trait for sending sampling requests to the client.
Sampling allows the server to request LLM completions from the client. This enables agentic workflows where tools can leverage the client’s LLM capabilities.