pub struct ElicitRequestFormParams {
pub message: String,
pub meta: Option<ElicitFormMeta>,
pub requested_schema: ElicitFormSchema,
pub task: Option<TaskMetadata>,
/* private fields */
}Expand description
The parameters for a request to elicit non-sensitive information from the user via a form in the client.
JSON schema
{
"description": "The parameters for a request to elicit non-sensitive information from the user via a form in the client.",
"type": "object",
"required": [
"message",
"requestedSchema"
],
"properties": {
"_meta": {
"description": "See [General fields: _meta](https://modelcontextprotocol.io/specification/2025-11-25/basic/index#meta) for notes on _meta usage.",
"type": "object",
"properties": {
"progressToken": {
"description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
"$ref": "#/$defs/ProgressToken"
}
},
"additionalProperties": {}
},
"message": {
"description": "The message to present to the user describing what information is being requested.",
"type": "string"
},
"mode": {
"description": "The elicitation mode.",
"type": "string",
"const": "form"
},
"requestedSchema": {
"description": "A restricted subset of JSON Schema.\nOnly top-level properties are allowed, without nesting.",
"type": "object",
"required": [
"properties",
"type"
],
"properties": {
"$schema": {
"type": "string"
},
"properties": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/PrimitiveSchemaDefinition"
}
},
"required": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "object"
}
}
},
"task": {
"description": "If specified, the caller is requesting task-augmented execution for this request.\nThe request will return a CreateTaskResult immediately, and the actual result can be\nretrieved later via tasks/result.\n\nTask augmentation is subject to capability negotiation - receivers MUST declare support\nfor task augmentation of specific request types in their capabilities.",
"$ref": "#/$defs/TaskMetadata"
}
}
}Fields§
§message: StringThe message to present to the user describing what information is being requested.
meta: Option<ElicitFormMeta>§requested_schema: ElicitFormSchema§task: Option<TaskMetadata>If specified, the caller is requesting task-augmented execution for this request. The request will return a CreateTaskResult immediately, and the actual result can be retrieved later via tasks/result. Task augmentation is subject to capability negotiation - receivers MUST declare support for task augmentation of specific request types in their capabilities.
Implementations§
Source§impl ElicitRequestFormParams
impl ElicitRequestFormParams
pub fn new( message: String, requested_schema: ElicitFormSchema, meta: Option<ElicitFormMeta>, task: Option<TaskMetadata>, ) -> Self
pub fn mode(&self) -> &Option<String>
Sourcepub fn mode_value() -> String
pub fn mode_value() -> String
returns “form”
pub fn mode_name() -> String
👎Deprecated since 0.8.0: Use
mode_value() instead.Trait Implementations§
Source§impl Clone for ElicitRequestFormParams
impl Clone for ElicitRequestFormParams
Source§fn clone(&self) -> ElicitRequestFormParams
fn clone(&self) -> ElicitRequestFormParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ElicitRequestFormParams
impl Debug for ElicitRequestFormParams
Source§impl<'de> Deserialize<'de> for ElicitRequestFormParams
impl<'de> Deserialize<'de> for ElicitRequestFormParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ElicitRequestFormParams> for ElicitRequestParams
impl From<ElicitRequestFormParams> for ElicitRequestParams
Source§fn from(value: ElicitRequestFormParams) -> Self
fn from(value: ElicitRequestFormParams) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ElicitRequestFormParams
impl RefUnwindSafe for ElicitRequestFormParams
impl Send for ElicitRequestFormParams
impl Sync for ElicitRequestFormParams
impl Unpin for ElicitRequestFormParams
impl UnwindSafe for ElicitRequestFormParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more