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-11-25 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-11-25)
19//! - [`crate::types::elicitation`] - User input elicitation (MCP 2025-11-25)
20//! - [`crate::types::roots`] - Filesystem boundaries (MCP 2025-11-25)
21//! - [`crate::types::completion`] - Argument autocompletion
22//! - [`crate::types::ping`] - Connection testing
23//! - [`crate::types::tasks`] - Tasks API for durable operations (MCP 2025-11-25)
24
25pub mod capabilities;
26pub mod completion;
27pub mod content;
28pub mod core;
29pub mod domain;
30pub mod elicitation;
31pub mod initialization;
32pub mod logging;
33pub mod ping;
34pub mod prompts;
35pub mod requests;
36pub mod resources;
37pub mod roots;
38pub mod sampling;
39pub mod tasks;
40pub mod tools;
41
42// Re-export all types for backward compatibility
43pub use capabilities::*;
44pub use completion::*;
45pub use content::*;
46pub use core::*;
47pub use elicitation::*;
48pub use initialization::*;
49pub use logging::*;
50pub use ping::*;
51pub use prompts::*;
52pub use requests::*;
53pub use resources::*;
54pub use roots::*;
55pub use sampling::{ModelHint, *};
56pub use tasks::*;
57pub use tools::*;
58
59// Re-export validated domain types (these have the same names as type aliases in core,
60// but are distinct types with validation. Core type aliases are preferred for backward compat)
61pub use domain::{
62    Base64Error,
63    MimeTypeError,
64    UriError,
65    // Note: Uri, MimeType, and Base64String from domain are NOT glob re-exported
66    // to avoid ambiguity with the type aliases in core. Access them via domain::Uri, etc.
67};