pub struct CustomPrompt {
pub name: String,
pub title: Option<String>,
pub description: Option<String>,
pub arguments: Vec<PromptArgument>,
pub content: PromptContent,
}Expand description
Descriptor for a custom MCP prompt.
Add to crate::ClapMcpServeOptions::custom_prompts to expose it when serving.
Fields§
§name: StringMCP prompt name. Must be unique (built-in uses clap-mcp-logging-guide).
title: Option<String>Optional human-readable title.
description: Option<String>Optional description.
arguments: Vec<PromptArgument>Optional prompt arguments (MCP list declares these; get can receive values).
content: PromptContentContent: static messages or async provider.
Implementations§
Source§impl CustomPrompt
impl CustomPrompt
Sourcepub fn to_list_prompt(&self) -> Prompt
pub fn to_list_prompt(&self) -> Prompt
Build an MCP Prompt for list_prompts.
Trait Implementations§
Source§impl Clone for CustomPrompt
impl Clone for CustomPrompt
Source§fn clone(&self) -> CustomPrompt
fn clone(&self) -> CustomPrompt
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CustomPrompt
impl !RefUnwindSafe for CustomPrompt
impl Send for CustomPrompt
impl Sync for CustomPrompt
impl Unpin for CustomPrompt
impl UnsafeUnpin for CustomPrompt
impl !UnwindSafe for CustomPrompt
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