pub struct McpExecuteSamplingParams {
pub mcp_request_id: Value,
pub request: McpExecuteSamplingRequest,
pub request_id: RequestId,
pub server_name: String,
}Expand description
Identifiers and raw MCP CreateMessageRequest params used to run a sampling inference.
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§mcp_request_id: ValueThe original MCP JSON-RPC request ID (string or number). Used by the runtime to correlate the inference with the originating MCP request for telemetry; this is distinct from requestId (which is the schema-level cancellation handle).
request: McpExecuteSamplingRequestRaw MCP CreateMessageRequest params, as received in the sampling.requested event. Treated as opaque at the schema layer; the runtime converts the embedded MCP messages into the OpenAI chat-completion shape internally.
request_id: RequestIdCaller-provided unique identifier for this sampling execution. Use this same ID with cancelSamplingExecution to cancel the in-flight call. Must be unique within the session for the lifetime of the call.
server_name: StringName of the MCP server that initiated the sampling request
Trait Implementations§
Source§impl Clone for McpExecuteSamplingParams
impl Clone for McpExecuteSamplingParams
Source§fn clone(&self) -> McpExecuteSamplingParams
fn clone(&self) -> McpExecuteSamplingParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more