Skip to content

Conversation

@koic
Copy link
Member

@koic koic commented Feb 3, 2026

Motivation and Context

This PR moves MCP::Annotations from lib/mcp.rb to lib/mcp/annotations.rb for better organization, following the pattern used for other classes such as Tool::Annotations.

This PR also adds the missing last_modified attribute to MCP::Annotations: https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/2025-11-25/schema.ts#L1701-L1736

It also adds a to_h method for serialization and includes comprehensive test coverage.

How Has This Been Tested?

Added comprehensive tests to verify the fix and prevent regression.

Breaking Changes

None. This code is unused within the ruby-sdk repository, but it is kept for compatibility, as it may be used by users.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

This PR moves `MCP::Annotations` from lib/mcp.rb to lib/mcp/annotations.rb for better organization,
following the pattern used for other classes such as `Tool::Annotations`.

This PR also adds the missing `last_modified` attribute to `MCP::Annotations`:
https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/2025-11-25/schema.ts#L1701-L1736

It also adds a `to_h` method for serialization and includes comprehensive test coverage.

NOTE: This code is unused within the ruby-sdk repository, but it is kept for compatibility, as it may be used by users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant