Expand description
All MCP protocol types (requests, responses, and data structures). MCP Protocol Types Module
This module contains all the type definitions for the Model Context Protocol organized into focused submodules based on the MCP 2025-06-18 specification.
§Module Organization
crate::types::core- Core protocol types and utilitiescrate::types::domain- Validated domain types (Uri, MimeType, Base64String)crate::types::capabilities- Client/server capability negotiationcrate::types::content- Message content types (text, image, audio, resources)crate::types::requests- Request/response/notification enumscrate::types::initialization- Connection handshake typescrate::types::tools- Tool calling and executioncrate::types::prompts- Prompt templatescrate::types::resources- Resource access and templatescrate::types::logging- Logging and progress trackingcrate::types::sampling- LLM sampling (MCP 2025-06-18)crate::types::elicitation- User input elicitation (MCP 2025-06-18)crate::types::roots- Filesystem boundaries (MCP 2025-06-18)crate::types::completion- Argument autocompletioncrate::types::ping- Connection testing
Re-exports§
pub use sampling::ModelHint;pub use domain::Base64Error;pub use domain::MimeTypeError;pub use domain::UriError;pub use capabilities::*;pub use completion::*;pub use content::*;pub use core::*;pub use elicitation::*;pub use initialization::*;pub use logging::*;pub use ping::*;pub use prompts::*;pub use requests::*;pub use resources::*;pub use roots::*;pub use sampling::*;pub use tools::*;
Modules§
- capabilities
- MCP capability negotiation types
- completion
- Argument autocompletion types
- content
- Message content types
- core
- Core protocol types and utilities
- domain
- Validated domain types
- elicitation
- User input elicitation types (MCP 2025-06-18)
- initialization
- Types for the MCP connection initialization and handshake process.
- logging
- Logging types
- ping
- Connection testing types
- prompts
- Prompt template types
- requests
- Request/response/notification routing types
- resources
- Resource access and template types
- roots
- Filesystem boundaries types (MCP 2025-06-18)
- sampling
- LLM sampling types (MCP 2025-06-18)
- tools
- Types for the MCP tool-calling system.