Skip to content

Latest commit

 

History

History
133 lines (118 loc) · 3.46 KB

File metadata and controls

133 lines (118 loc) · 3.46 KB

MCP Serialization Coverage Report

✅ Request Types (All Covered)

  • InitializeRequest
  • PingRequest
  • CompleteRequest
  • SetLevelRequest
  • CallToolRequest
  • ListToolsRequest
  • GetPromptRequest
  • ListPromptsRequest
  • ReadResourceRequest
  • ListResourcesRequest
  • ListResourceTemplatesRequest
  • SubscribeRequest
  • UnsubscribeRequest
  • ListRootsRequest
  • CreateMessageRequest
  • ElicitRequest
  • PaginatedRequest (base type)
  • jsonrpc::Request (base type)

✅ Response/Result Types (All Covered)

  • InitializeResult
  • CompleteResult
  • CallToolResult
  • ListToolsResult
  • GetPromptResult
  • ListPromptsResult
  • ReadResourceResult
  • ListResourcesResult
  • ListResourceTemplatesResult
  • ListRootsResult
  • CreateMessageResult
  • ElicitResult
  • EmptyResult
  • PaginatedResult (base type)
  • jsonrpc::Response
  • jsonrpc::ResponseResult

✅ Notification Types (All Covered)

  • InitializedNotification
  • CancelledNotification
  • ProgressNotification
  • RootsListChangedNotification
  • LoggingMessageNotification
  • ResourceUpdatedNotification
  • ResourceListChangedNotification
  • ToolListChangedNotification
  • PromptListChangedNotification
  • jsonrpc::Notification (base type)

✅ Core Data Structures (All Covered)

Content Types

  • TextContent
  • ImageContent
  • AudioContent
  • ResourceContent
  • ContentBlock (variant)
  • ExtendedContentBlock (variant with ResourceLink, EmbeddedResource)
  • ResourceLink (handled in ExtendedContentBlock)
  • EmbeddedResource (handled in ExtendedContentBlock)

Resource Types

  • Resource
  • ResourceTemplate
  • ResourceContents (base)
  • TextResourceContents
  • BlobResourceContents
  • Root

Tool & Prompt Types

  • Tool
  • ToolParameter (handled within Tool)
  • ToolAnnotations
  • Prompt
  • PromptArgument (handled within Prompt)
  • PromptMessage
  • PromptReference

Message Types

  • Message
  • SamplingMessage
  • ModelPreferences
  • ModelHint
  • SamplingParams

Error Types

  • Error
  • ErrorData (variant)

Reference Types

  • ResourceTemplateReference
  • PromptReference

Annotation Types

  • Annotations
  • ToolAnnotations
  • BaseMetadata

✅ Capability Types (All Covered)

  • ServerCapabilities
  • ClientCapabilities
  • RootsCapability
  • ResourcesCapability
  • PromptsCapability
  • EmptyCapability

✅ Helper/Utility Types (All Covered)

  • Implementation (ServerInfo/ClientInfo)
  • RequestId (variant<string, int>)
  • ProgressToken (same as RequestId)
  • Cursor (string alias)
  • Metadata (map<string, MetadataValue>)
  • Role (enum)
  • LoggingLevel (enum)

✅ Schema Types (Handled in Context)

  • StringSchema (handled within ElicitRequest)
  • NumberSchema (handled within ElicitRequest)
  • BooleanSchema (handled within ElicitRequest)
  • EnumSchema (handled within ElicitRequest)
  • PrimitiveSchemaDefinition (variant, handled within ElicitRequest)

Summary

Total Coverage: 100%

All MCP types defined in the types.h file have corresponding serialization and deserialization functions. The implementation uses:

  • Template functions for common patterns (vectors, optionals)
  • Variant pattern matching for discriminated unions
  • Proper error handling with JsonException
  • Enum string conversions
  • Support for nested and complex types