pub struct ElicitResult {
pub action: ElicitationAction,
pub content: Option<HashMap<String, Value>>,
pub _meta: Option<Value>,
}Expand description
Elicit result
§Version Support
- MCP 2025-11-25: action, content (form mode), _meta
- MCP 2025-11-25 draft (SEP-1330): Clarified content field behavior
§Content Field Behavior (SEP-1330 Clarification)
The content field is only present when:
actionis"accept"(user submitted the form), AND- Mode was
"form"(in-band structured data collection)
The content field is omitted when:
- Action is
"decline"or"cancel" - Mode was
"url"(out-of-band, data doesn’t transit through MCP)
§Example
Form mode with accept:
{
"action": "accept",
"content": {
"name": "Alice",
"email": "alice@example.com"
}
}URL mode with accept:
{
"action": "accept"
}Note: No content field - data was collected out-of-band
Fields§
§action: ElicitationActionThe user action in response to the elicitation
accept: User submitted the form/confirmed the actiondecline: User explicitly declined the actioncancel: User dismissed without making an explicit choice
content: Option<HashMap<String, Value>>The submitted form data, only present when action is “accept” and mode was “form”.
Contains values matching the requested schema. Omitted for:
actionis"decline"or"cancel"- URL mode responses (out-of-band data collection)
Per MCP 2025-11-25 draft (SEP-1330), this clarification ensures clients understand when to expect form data vs. out-of-band completion.
_meta: Option<Value>Optional metadata per MCP 2025-11-25 specification
Trait Implementations§
Source§impl Clone for ElicitResult
impl Clone for ElicitResult
Source§fn clone(&self) -> ElicitResult
fn clone(&self) -> ElicitResult
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 ElicitResult
impl Debug for ElicitResult
Source§impl<'de> Deserialize<'de> for ElicitResult
impl<'de> Deserialize<'de> for ElicitResult
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
Auto Trait Implementations§
impl Freeze for ElicitResult
impl RefUnwindSafe for ElicitResult
impl Send for ElicitResult
impl Sync for ElicitResult
impl Unpin for ElicitResult
impl UnwindSafe for ElicitResult
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