pub enum McpCreateElicitationRequestParams {
FormElicitationParams {
meta: Option<Meta>,
message: String,
requested_schema: ElicitationSchema,
},
UrlElicitationParams {
meta: Option<Meta>,
message: String,
url: String,
elicitation_id: String,
},
}Expand description
Re-exports of the rmcp wire-protocol types this crate now surfaces directly instead of wrapping. Pull these in to pattern-match on tool annotations, content blocks, structured tool output, embedded resources, sampling / elicitation requests, progress and log notifications, etc. Parameters for creating an elicitation request to gather user input.
This structure contains everything needed to request interactive input from a user:
- A human-readable message explaining what information is needed
- A type-safe schema defining the expected structure of the response
§Example
- Form-based elicitation request
use rmcp::model::*;
let params = CreateElicitationRequestParams::FormElicitationParams {
meta: None,
message: "Please provide your email".to_string(),
requested_schema: ElicitationSchema::builder()
.required_email("email")
.build()
.unwrap(),
};- URL-based elicitation request
use rmcp::model::*;
let params = CreateElicitationRequestParams::UrlElicitationParams {
meta: None,
message: "Please provide your feedback at the following URL".to_string(),
url: "https://example.com/feedback".to_string(),
elicitation_id: "unique-id-123".to_string(),
};Variants§
FormElicitationParams
Fields
message: StringHuman-readable message explaining what input is needed from the user. This should be clear and provide sufficient context for the user to understand what information they need to provide.
requested_schema: ElicitationSchemaType-safe schema defining the expected structure and validation rules for the user’s response. This enforces the MCP 2025-06-18 specification that elicitation schemas must be objects with primitive-typed properties.
UrlElicitationParams
Fields
message: StringHuman-readable message explaining what input is needed from the user. This should be clear and provide sufficient context for the user to understand what information they need to provide.
Trait Implementations§
Source§impl Clone for CreateElicitationRequestParams
impl Clone for CreateElicitationRequestParams
Source§fn clone(&self) -> CreateElicitationRequestParams
fn clone(&self) -> CreateElicitationRequestParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de> Deserialize<'de> for CreateElicitationRequestParams
impl<'de> Deserialize<'de> for CreateElicitationRequestParams
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateElicitationRequestParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateElicitationRequestParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for CreateElicitationRequestParams
impl PartialEq for CreateElicitationRequestParams
Source§fn eq(&self, other: &CreateElicitationRequestParams) -> bool
fn eq(&self, other: &CreateElicitationRequestParams) -> bool
self and other values to be equal, and is used by ==.