Skip to main content

PromptHandler

Trait PromptHandler 

Source
pub trait PromptHandler: Send + Sync {
    // Required methods
    fn list(&self) -> Vec<McpPrompt>;
    fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        arguments: HashMap<String, String>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<PromptMessage>, McpError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Handler for prompts

Required Methods§

Source

fn list(&self) -> Vec<McpPrompt>

List available prompts

Source

fn get<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, arguments: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<Vec<PromptMessage>, McpError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a prompt with arguments applied

Implementors§