pub trait PromptProvider: Send + Sync {
// Required methods
fn list_prompts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cursor: Option<&'life1 str>,
ctx: &'life2 RequestContext,
) -> Pin<Box<dyn Future<Output = Result<(Vec<Prompt>, Option<String>)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_prompt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
name: &'life1 str,
arguments: Option<HashMap<String, String>>,
ctx: &'life2 RequestContext,
) -> Pin<Box<dyn Future<Output = Result<(Option<String>, Vec<PromptMessage>)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Trait for implementing prompt providers
Implement this trait to provide prompts (templates, instructions) to MCP clients. All methods receive a RequestContext with access to headers and request metadata.