1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! # TurboMCP Types
//!
//! Core types for the TurboMCP SDK - the foundation of MCP server development.
//!
//! This crate provides all shared types used across the TurboMCP ecosystem:
//!
//! - **Content types**: `Content`, `TextContent`, `ImageContent`, etc.
//! - **Result types**: `ToolResult`, `ResourceResult`, `PromptResult`
//! - **Definition types**: `Tool`, `Resource`, `Prompt`, `ServerInfo`
//! - **Conversion traits**: `IntoToolResult`, `IntoResourceResult`, `IntoPromptResult`
//!
//! For error handling, use `turbomcp_core::error::{McpError, McpResult}`.
//!
//! ## Design Principles
//!
//! 1. **Single Source of Truth**: These types are the canonical definitions
//! 2. **Ergonomic by Default**: Common operations are one-liners
//! 3. **MCP 2025-11-25 Compliant**: Full spec support
//! 4. **no_std Compatible**: Works in WASM and embedded environments
//!
//! ## Quick Start
//!
//! ```rust
//! use turbomcp_types::*;
//!
//! // Create a tool result
//! let result = ToolResult::text("Hello, world!");
//!
//! // Create an error result
//! let error = ToolResult::error("Something went wrong");
//!
//! // Create a JSON result with structured content
//! let json_result = ToolResult::json(&serde_json::json!({"key": "value"})).unwrap();
//!
//! // Create a resource result
//! let resource = ResourceResult::text("file:///example.txt", "File contents here");
//!
//! // Create a prompt result
//! let prompt = PromptResult::user("Hello!")
//! .add_assistant("How can I help?")
//! .with_description("A greeting prompt");
//! ```
extern crate alloc;
// Re-export everything at the crate root for convenience
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
/// Version of the TurboMCP types crate
pub const VERSION: &str = env!;