Fix Resource::Contents#to_h to use correct property names per MCP spec#235
Merged
koic merged 1 commit intomodelcontextprotocol:mainfrom Feb 20, 2026
Conversation
This PR fixes thr following fields with the MCP specification which requires: - Text resources use `text` and `mimeType` fields - Binary resources use `blob` (base64-encoded) and `mimeType` fields https://modelcontextprotocol.io/specification/2025-11-25/server/resources#resource-contents Fixes modelcontextprotocol#234.
dd23efc to
08832c6
Compare
Member
Author
|
@modelcontextprotocol/ruby-sdk If possible, this bug fix is planned to be included in the upcoming 0.7.1 release. Could you please review it when you have time? |
jonathanhefner
approved these changes
Feb 20, 2026
Member
jonathanhefner
left a comment
There was a problem hiding this comment.
Flagging that this is technically a breaking change, but I assume that is acceptable because it is 0.x version. 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
This PR fixes thr following fields with the MCP specification which requires:
textandmimeTypefieldsblob(base64-encoded) andmimeTypefieldshttps://modelcontextprotocol.io/specification/2025-11-25/server/resources#resource-contents
Fixes #234.
How Has This Been Tested?
Added a repro test to verify the fix and prevent regression.
Breaking Changes
None.
Types of changes
Checklist