mcprotocol_rs/server_features/
prompts.rs1use async_trait::async_trait;
2use serde::{Deserialize, Serialize};
3use serde_json::Value;
4
5use crate::Result;
6
7#[derive(Debug, Clone, Serialize, Deserialize)]
9pub struct Prompt {
10 pub id: String,
12 pub name: String,
14 pub description: String,
16 pub template: String,
18 pub parameters: Option<Value>,
20}
21
22#[async_trait]
24pub trait PromptManager: Send + Sync {
25 async fn list_prompts(&self) -> Result<Vec<Prompt>>;
27
28 async fn get_prompt(&self, id: &str) -> Result<Prompt>;
30
31 async fn execute_prompt(&self, id: &str, params: Option<Value>) -> Result<Value>;
33}