Available on crate feature
server only.Expand description
Prompt handling infrastructure for MCP servers
This module provides the core types and traits for implementing prompt handlers in MCP servers. Prompts allow servers to provide reusable templates for LLM interactions with customizable arguments.
Re-exports§
Structs§
- Async
Method Adapter - Adapter type for async methods that return
Vec<PromptMessage> - Async
Method With Args Adapter - Adapter type for async methods with parameters that return
Vec<PromptMessage> - Async
Prompt Adapter - Adapter types for macro-generated implementations
- Async
Prompt Method Adapter - Prompt
Context - Context for prompt retrieval operations
- Prompt
Name - Sync
Prompt Adapter - Sync
Prompt Method Adapter
Enums§
Traits§
- GetPrompt
Handler - Trait for handling prompt retrieval
- Into
GetPrompt Result - Trait for types that can be converted into GetPromptResult
Functions§
- cached_
arguments_ from_ schema - Extract prompt arguments from a type’s JSON schema This function analyzes the schema of a type and extracts the properties as PromptArgument entries with name, description, and required status
Type Aliases§
- DynGet
Prompt Handler Non- local - Type alias for dynamic prompt handlers