Macros§
- json
- Construct a
serde_json::Value
from a JSON literal.
Structs§
- Annotations
- Generic annotations structure (matches TypeScript Annotations) Used across all MCP types that support client annotations
- Call
Tool Params - Parameters for tools/call request (matches TypeScript CallToolRequest.params)
- Call
Tool Request - Complete tools/call request (matches TypeScript CallToolRequest interface)
- Call
Tool Result - Result for tools/call (per MCP spec)
- Client
Capabilities - Capabilities that a client may support
- Create
Message Result - Result for sampling/createMessage (per MCP spec)
- Cursor
- Cursor for pagination support
- GetPrompt
Params - Parameters for prompts/get request (matches MCP GetPromptRequest.params exactly)
- HashMap
- A hash map implemented with quadratic probing and SIMD lookup.
- Implementation
- Describes the name and version of an MCP implementation
- Initialize
Request - Parameters for initialize request
- Json
RpcNotification - A JSON-RPC 2.0 notification (no response expected)
- Json
RpcRequest - A standard JSON-RPC 2.0 request
- Json
RpcResponse - A standard JSON-RPC 2.0 response
- List
Resources Params - Parameters for resources/list request
- Logging
Message Notification - Method: “notifications/message”
- Logging
Message Notification Params - Notification
- Base notification structure following MCP TypeScript specification
- Notification
Params - Base notification parameters that can include _meta
- Progress
Notification - Method: “notifications/progress”
- Progress
Notification Params - Prompt
- A prompt descriptor (matches TypeScript Prompt interface exactly)
- Prompt
Argument - Argument definition for prompts (extends BaseMetadata per MCP spec)
- Prompt
Message - Message content for prompts (matches MCP PromptMessage interface exactly)
- Read
Resource Params - Parameters for resources/read request
- Resource
- A resource descriptor (matches TypeScript Resource interface) Resource extends BaseMetadata, so it includes name and title fields
- Resource
Template - A template description for resources available on the server ResourceTemplate extends BaseMetadata
- Resource
Updated Notification - Method: “notifications/resources/updated”
- Resource
Updated Notification Params - Sampling
Message - Sampling message (per MCP spec)
- Tool
- Tool definition
- Tool
Schema - JSON Schema definition for tool input/output (matches TypeScript spec exactly) Must be an object with type: “object”, properties, and required fields
Enums§
- Content
Block - Content block union type matching MCP 2025-06-18 specification exactly
- McpError
- MCP-specific errors
- McpVersion
- Supported MCP protocol versions
- Resource
Content - Union type for resource contents (matches TypeScript union)
- Role
- Role enum for messages (per MCP spec)
- Value
- Represents any valid JSON value.
Traits§
- Completion
Definition - Complete MCP Completion Creation - Build intelligent autocomplete providers for enhanced UX.
- HasAnnotations
- Annotations trait
- HasBase
Metadata - Base metadata trait - matches TypeScript BaseMetadata interface
- HasCompletion
Context - Trait for completion context (argument, context)
- HasCompletion
Handling - Trait for completion validation and processing
- HasCompletion
Metadata - Trait for completion metadata (method, reference type)
- HasDescription
- Tool description trait
- HasInput
Schema - Input schema trait
- HasLog
Level - Trait for logging level configuration
- HasLogging
Metadata - Trait for logging metadata (method, logger name)
- HasOutput
Schema - Output schema trait
- HasPrompt
Annotations - Prompt annotations trait
- HasPrompt
Arguments - Prompt arguments trait
- HasPrompt
Description - Prompt description trait
- HasPrompt
Meta - Prompt-specific meta trait (separate from RPC _meta)
- HasPrompt
Metadata - Base metadata trait - matches TypeScript BaseMetadata interface
- HasResource
Annotations - Resource annotations trait
- HasResource
Description - Resource description trait
- HasResource
Meta - Resource-specific meta trait (separate from RPC _meta)
- HasResource
Metadata - Base metadata trait - matches TypeScript BaseMetadata interface
- HasResource
Mime Type - Resource MIME type trait
- HasResource
Size - Resource size trait
- HasResource
Uri - Resource URI trait
- HasRoot
Annotations - Trait for root annotations and custom metadata
- HasRoot
Filtering - Trait for root filtering and exclusions
- HasRoot
Metadata - Trait for root metadata (URI, name, path info)
- HasRoot
Permissions - Trait for root permissions and security
- HasSampling
Config - Trait for sampling configuration (from CreateMessageRequest spec)
- HasSampling
Context - Trait for sampling context (from CreateMessageRequest spec)
- HasTool
Meta - Tool-specific meta trait (separate from RPC _meta)
- Logger
Definition - Complete MCP Logger Creation - Build structured logging systems with level control.
- Prompt
Definition - Complete prompt definition - composed from fine-grained traits Complete MCP Prompt Creation - Build reusable prompt templates that generate contextual content.
- Resource
Definition - Complete MCP Resource Creation - Build readable resources that clients can access.
- Root
Definition - Complete MCP Root Creation - Build secure file system access boundaries.
- Sampling
Definition - Complete MCP Sampling Creation - Build AI model interaction and completion systems.
- Tool
Definition - Complete tool definition - composed from fine-grained traits Complete MCP Tool Creation - Build executable tools that clients can invoke.
Type Aliases§
- McpResult
- Common result type for MCP operations
- Tool
Result - Tool result type - an alias for ContentBlock to maintain backward compatibility while ensuring MCP 2025-06-18 specification compliance