Expand description
§MCP Protocol Types
This module contains all the type definitions for the Model Context Protocol according to the 2025-06-18 specification.
Modules§
- error_
codes - Standard JSON-RPC error codes per specification
Structs§
- Annotations
- General annotations that can be attached to various MCP objects
- Argument
Info - Information about the argument being completed
- Audio
Content - Audio content per MCP 2025-06-18 specification
- Base
Metadata - Base interface for metadata with name (identifier) and title (display name) properties. Per MCP specification 2025-06-18, this is the foundation for Tool, Resource, and Prompt metadata.
- Blob
Resource Contents - Binary resource contents
- Call
Tool Request - Call tool request
- Call
Tool Result - Call tool result
- Cancelled
Notification - Cancellation notification per MCP 2025-06-18 specification
- Client
Capabilities - Client capabilities per MCP 2025-06-18 specification
- Complete
Request - Request for argument completion
- Complete
Request Params - Parameters for completion/complete request
- Complete
Result - Server’s response to a completion request
- Completion
Capabilities - Completion capabilities
- Completion
Context - Context for completion requests
- Completion
Response - Completion response information
- Create
Message Request - Create message request
- Create
Message Result - Create message result
- Elicit
Request - Request to elicit user input (server-initiated)
- Elicit
Request Params - Parameters for elicitation/create request
- Elicit
Result - Client’s response to an elicitation request
- Elicitation
Capabilities - Elicitation capabilities
- Elicitation
Schema - Elicitation schema - restricted subset of JSON Schema for primitive types only
- Embedded
Resource - Embedded resource content per MCP 2025-06-18 specification
- Empty
Result - Empty result for operations that don’t return data
- GetPrompt
Request - Get prompt request
- GetPrompt
Result - Get prompt result
- Image
Content - Image content per MCP 2025-06-18 specification
- Implementation
- Implementation information for MCP clients and servers
- Initialize
Request - Initialize request
- Initialize
Result - Initialize result
- Initialized
Notification - Initialized notification (no parameters)
- Json
RpcError - JSON-RPC error structure per MCP 2025-06-18 specification
- List
Prompts Request - List prompts request (no parameters)
- List
Prompts Result - List prompts result
- List
Resource Templates Params - Parameters for listing resource templates
- List
Resource Templates Request - Request to list resource templates
- List
Resource Templates Result - Result of listing resource templates
- List
Resources Request - List resources request
- List
Resources Result - List resources result
- List
Roots Request - List roots request (no parameters)
- List
Roots Result - List roots result
- List
Tools Request - List tools request (no parameters)
- List
Tools Result - List tools result
- Logging
Capabilities - Logging capabilities
- Logging
Notification - Logging notification
- Model
Hint - Model hint
- Model
Preferences - Model preferences
- Ping
Params - Parameters for ping requests
- Ping
Request - A ping request to check connection health
- Ping
Result - Response to a ping request (usually empty)
- Progress
Notification - Progress notification per MCP 2025-06-18 specification
- Prompt
- Prompt definition per MCP 2025-06-18 specification
- Prompt
Argument - Prompt argument definition per MCP 2025-06-18 specification
- Prompt
Message - Prompt message
- Prompt
Reference - Reference to a prompt for completion
- Prompt
Reference Data - Data for prompt reference (excluding the type field)
- Prompts
Capabilities - Prompts capabilities
- Read
Resource Request - Read resource request
- Read
Resource Result - Read resource result
- Resource
- Resource definition per MCP 2025-06-18 specification
- Resource
Contents - Base resource contents interface
- Resource
Link - Resource link per MCP 2025-06-18 specification
- Resource
Template - A template description for resources available on the server Supports RFC 6570 URI template expansion
- Resource
Template Reference - Reference to a resource template for completion
- Resource
Template Reference Data - Data for resource template reference (excluding the type field)
- Resource
Updated Notification - Resource updated notification
- Resources
Capabilities - Resources capabilities
- Root
- Filesystem root
- Roots
Capabilities - Roots capabilities
- Roots
List Changed Notification - Roots list changed notification (no parameters)
- Sampling
Capabilities - Sampling capabilities
- Sampling
Message - Sampling message
- Server
Capabilities - Server capabilities per MCP 2025-06-18 specification
- SetLevel
Request - Set log level request
- SetLevel
Result - Set log level result (no data)
- Subscribe
Request - Subscribe to resource request
- Text
Content - Text content per MCP 2025-06-18 specification
- Text
Resource Contents - Text resource contents
- Tool
- Tool definition per MCP 2025-06-18 specification
- Tool
Annotations - Tool-specific annotations for additional tool information
- Tool
Input Schema - Tool input schema definition
- Tool
Output Schema - Tool output schema definition
- Tools
Capabilities - Tools capabilities
- Unsubscribe
Request - Unsubscribe from resource request
Enums§
- Client
Notification - Client-initiated notification
- Client
Request - Client-initiated request
- Completion
Reference - Reference types for completion requests
- Content
Block - Content block union type per MCP 2025-06-18 specification
- Elicitation
Action - Action taken by user in response to elicitation
- Include
Context - Include context options
- LogLevel
- Log level
- Primitive
Schema Definition - Primitive schema definition for elicitation requests Only allows primitive types without nesting, as per MCP 2025-06-18 spec
- Resource
Content - Union type for resource contents (text or binary)
- Role
- Role in conversation
- Server
Notification - Server-initiated notification
- Server
Request - Server-initiated request
Type Aliases§
- Base64
String - Base64 encoded data
- Content
- Compatibility alias for the old Content enum
- Cursor
- Cursor for pagination
- Mime
Type - MIME type
- Progress
Token - Progress token for tracking long-running operations
- Prompt
Input - Prompt input parameters
- Protocol
Version - Protocol version string
- Request
Id - JSON-RPC request identifier
- Uri
- URI string