pub enum InputRequest {
CreateMessage(CreateMessageRequest),
ListRoots(ListRootsRequest),
Elicit(ElicitRequest),
}Expand description
Core MCP protocol types and error handling
Server → client request emitted as part of an InputRequiredResult.
type InputRequest = CreateMessageRequest | ListRootsRequest | ElicitRequest.
Serialized untagged at the Rust level; the custom Deserialize impl
dispatches on the wire method string (sampling/createMessage,
roots/list, elicitation/create) and rejects any other value, so the
schema’s union discriminator is enforced explicitly rather than relying
on first-variant-wins fallback.
Note: CreateMessageRequest (Sampling) and ListRootsRequest (Roots)
are themselves deprecated per SEP-2577 in 2026-07-28. They remain valid
variants of InputRequest during the 12-month migration window so servers
can continue to ask clients for sampling/roots input via the MRTR pattern
(SEP-2322). After the deprecated features are removed, the corresponding
variants will be removed from this enum.
Variants§
CreateMessage(CreateMessageRequest)
sampling/createMessage request. Deprecated per SEP-2577.
ListRoots(ListRootsRequest)
roots/list request. Deprecated per SEP-2577.
Elicit(ElicitRequest)
elicitation/create request.
Trait Implementations§
Source§impl Clone for InputRequest
impl Clone for InputRequest
Source§fn clone(&self) -> InputRequest
fn clone(&self) -> InputRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more