pub struct GetPromptRequestParams {
pub name: String,
pub arguments: Option<HashMap<String, String>>,
pub input_responses: Option<HashMap<String, InputResponse>>,
pub request_state: Option<String>,
pub meta: RequestMetaObject,
}Expand description
Parameters for prompts/get request — GetPromptRequestParams extends InputResponseRequestParams. Carries the SEP-2322 multi-round-trip mixin
(inputResponses?, requestState?).
Fields§
§name: StringName of the prompt to get.
arguments: Option<HashMap<String, String>>Arguments to pass to the prompt — { [key: string]: string }.
input_responses: Option<HashMap<String, InputResponse>>Responses to a prior InputRequiredResult (mixin from
InputResponseRequestParams).
request_state: Option<String>Verbatim echo of InputRequiredResult.requestState (mixin).
meta: RequestMetaObjectSchema-typed _meta per RequestMetaObject. Required per schema
(GetPromptRequestParams extends InputResponseRequestParams extends RequestParams,
and RequestParams._meta is required in 2026-07-28 stateless core).
Implementations§
Source§impl GetPromptRequestParams
impl GetPromptRequestParams
Sourcepub fn new(
name: impl Into<String>,
meta: RequestMetaObject,
) -> GetPromptRequestParams
pub fn new( name: impl Into<String>, meta: RequestMetaObject, ) -> GetPromptRequestParams
Construct with the required _meta and prompt name.
pub fn with_arguments( self, arguments: HashMap<String, String>, ) -> GetPromptRequestParams
pub fn with_meta(self, meta: RequestMetaObject) -> GetPromptRequestParams
Sourcepub fn with_input_responses(
self,
responses: HashMap<String, InputResponse>,
request_state: impl Into<String>,
) -> GetPromptRequestParams
pub fn with_input_responses( self, responses: HashMap<String, InputResponse>, request_state: impl Into<String>, ) -> GetPromptRequestParams
Attach prior InputRequiredResult responses + verbatim state echo.
Trait Implementations§
Source§impl Clone for GetPromptRequestParams
impl Clone for GetPromptRequestParams
Source§fn clone(&self) -> GetPromptRequestParams
fn clone(&self) -> GetPromptRequestParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GetPromptRequestParams
impl Debug for GetPromptRequestParams
Source§impl<'de> Deserialize<'de> for GetPromptRequestParams
impl<'de> Deserialize<'de> for GetPromptRequestParams
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GetPromptRequestParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GetPromptRequestParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Params for GetPromptRequestParams
Source§impl SerdeParamExtractor<GetPromptRequestParams> for GetPromptRequestParams
impl SerdeParamExtractor<GetPromptRequestParams> for GetPromptRequestParams
type Error = McpError
Source§fn extract_serde(
params: RequestParams,
) -> Result<GetPromptRequestParams, <GetPromptRequestParams as SerdeParamExtractor<GetPromptRequestParams>>::Error>
fn extract_serde( params: RequestParams, ) -> Result<GetPromptRequestParams, <GetPromptRequestParams as SerdeParamExtractor<GetPromptRequestParams>>::Error>
Extract parameters using serde deserialization
Source§impl Serialize for GetPromptRequestParams
impl Serialize for GetPromptRequestParams
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for GetPromptRequestParams
impl RefUnwindSafe for GetPromptRequestParams
impl Send for GetPromptRequestParams
impl Sync for GetPromptRequestParams
impl Unpin for GetPromptRequestParams
impl UnsafeUnpin for GetPromptRequestParams
impl UnwindSafe for GetPromptRequestParams
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<B> IntoFunctionResponse<B, Body> for Bwhere
B: Serialize,
impl<B> IntoFunctionResponse<B, Body> for Bwhere
B: Serialize,
Source§fn into_response(self) -> FunctionResponse<B, Body>
fn into_response(self) -> FunctionResponse<B, Body>
Convert the type into a FunctionResponse.