turbomcp_protocol/types/
mod.rs

1//! MCP Protocol Types Module
2//!
3//! This module contains all the type definitions for the Model Context Protocol
4//! organized into focused submodules based on the MCP 2025-06-18 specification.
5//!
6//! # Module Organization
7//!
8//! - [`crate::types::core`] - Core protocol types and utilities
9//! - [`crate::types::domain`] - Validated domain types (Uri, MimeType, Base64String)
10//! - [`crate::types::capabilities`] - Client/server capability negotiation
11//! - [`crate::types::content`] - Message content types (text, image, audio, resources)
12//! - [`crate::types::requests`] - Request/response/notification enums
13//! - [`crate::types::initialization`] - Connection handshake types
14//! - [`crate::types::tools`] - Tool calling and execution
15//! - [`crate::types::prompts`] - Prompt templates
16//! - [`crate::types::resources`] - Resource access and templates
17//! - [`crate::types::logging`] - Logging and progress tracking
18//! - [`crate::types::sampling`] - LLM sampling (MCP 2025-06-18)
19//! - [`crate::types::elicitation`] - User input elicitation (MCP 2025-06-18)
20//! - [`crate::types::roots`] - Filesystem boundaries (MCP 2025-06-18)
21//! - [`crate::types::completion`] - Argument autocompletion
22//! - [`crate::types::ping`] - Connection testing
23
24pub mod capabilities;
25pub mod completion;
26pub mod content;
27pub mod core;
28pub mod domain;
29pub mod elicitation;
30pub mod initialization;
31pub mod logging;
32pub mod ping;
33pub mod prompts;
34pub mod requests;
35pub mod resources;
36pub mod roots;
37pub mod sampling;
38pub mod tools;
39
40// Re-export all types for backward compatibility
41pub use capabilities::*;
42pub use completion::*;
43pub use content::*;
44pub use core::*;
45pub use elicitation::*;
46pub use initialization::*;
47pub use logging::*;
48pub use ping::*;
49pub use prompts::*;
50pub use requests::*;
51pub use resources::*;
52pub use roots::*;
53pub use sampling::{ModelHint, *};
54pub use tools::*;
55
56// Re-export validated domain types (these have the same names as type aliases in core,
57// but are distinct types with validation. Core type aliases are preferred for backward compat)
58pub use domain::{
59    Base64Error,
60    MimeTypeError,
61    UriError,
62    // Note: Uri, MimeType, and Base64String from domain are NOT glob re-exported
63    // to avoid ambiguity with the type aliases in core. Access them via domain::Uri, etc.
64};