Module types

Source
Expand description

Complete MCP Protocol Types for 2025-03-26 Specification

This module contains all the core types defined by the Model Context Protocol specification version 2025-03-26, including all new features and capabilities.

Modules§

error_codes
Standard JSON-RPC error codes

Structs§

Annotations
Tool behavior annotations (2025-03-26)
AudioContent
Audio content (2025-03-26 NEW)
CallToolResult
Result of a tool execution (2025-03-26 with metadata)
ClientCapabilities
Client capabilities for 2025-03-26
CompletionsCapability
Autocompletion capabilities (2025-03-26)
CreateMessageResult
Result of sampling/createMessage (2025-03-26)
EmbeddedResource
Embedded resource content (2025-03-26)
ErrorObject
Error object
GetPromptResult
Result of prompt execution (2025-03-26 with metadata)
ImageContent
Image content
Implementation
Information about an MCP implementation
JsonRpcError
JSON-RPC error message
JsonRpcNotification
JSON-RPC notification message
JsonRpcRequest
JSON-RPC request message
JsonRpcResponse
JSON-RPC response message
LoggingCapability
Logging capabilities (2025-03-26)
ModelPreferences
Model preferences for sampling
Notification
Base notification with metadata support
NotificationParams
Notification parameters with metadata
PaginatedRequest
Base for paginated requests
PaginatedResult
Base for paginated results
Prompt
Prompt definition
PromptArgument
Argument for a prompt
PromptMessage
Message in a prompt result (2025-03-26 with audio support)
PromptsCapability
Prompt-related server capabilities
Request
Base request with metadata support
RequestMeta
Request metadata
RequestParams
Request parameters with metadata
Resource
Resource definition
ResourceReference
Resource reference for embedded resources
ResourceTemplate
Resource template for URI patterns
ResourcesCapability
Resource-related server capabilities
RootsCapability
Roots capability for clients (2025-03-26)
SamplingCapability
Sampling-related capabilities
SamplingMessage
A message in a sampling conversation (2025-03-26 with audio)
ServerCapabilities
Server capabilities for 2025-03-26
TextContent
Text content
Tool
Tool definition with annotations (2025-03-26)
ToolInputSchema
Tool input schema
ToolsCapability
Tool-related server capabilities

Enums§

AnnotationAudience
Target audience for tool usage
Content
Unified content type (2025-03-26 complete)
DangerLevel
Danger level classification for tools
JsonRpcId
JSON-RPC ID type for better type safety
JsonRpcMessage
Complete JSON-RPC message types (2025-03-26)
JsonRpcRequestOrNotification
Items in a batch request
JsonRpcResponseOrError
Items in a batch response
LoggingLevel
Logging level enumeration (2025-03-26)
ResourceContents
Content of a resource
Role
Message role
StopReason
Reasons why sampling stopped

Constants§

JSONRPC_VERSION
LATEST_PROTOCOL_VERSION
MCP Protocol version (2025-03-26)
PROTOCOL_VERSION

Type Aliases§

ClientInfo
Cursor
Cursor for pagination
JsonRpcBatchRequest
JSON-RPC batch request (2025-03-26 NEW)
JsonRpcBatchResponse
JSON-RPC batch response (2025-03-26 NEW)
ProgressToken
Progress token for associating notifications with requests
PromptInfo
PromptResult
RequestId
Request ID for JSON-RPC correlation
ResourceInfo
ServerInfo
ToolInfo
ToolResult