-
Notifications
You must be signed in to change notification settings - Fork 75
Add support for _meta field on tool schema #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
atesgoral
merged 6 commits into
modelcontextprotocol:main
from
tuntisz:tau/support-_meta-field
Oct 1, 2025
Merged
Add support for _meta field on tool schema #124
atesgoral
merged 6 commits into
modelcontextprotocol:main
from
tuntisz:tau/support-_meta-field
Oct 1, 2025
+71
−3
Conversation
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
koic
reviewed
Sep 1, 2025
0f5b460
to
3127bb6
Compare
I really need this! Looking forward to seeing this. |
atesgoral
reviewed
Sep 13, 2025
topherbullock
requested changes
Sep 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please update the name to meta
to closely match the field's name in the spec?
LGTM otherwise, thanks @tuntisz!
atesgoral
reviewed
Oct 1, 2025
atesgoral
reviewed
Oct 1, 2025
atesgoral
reviewed
Oct 1, 2025
atesgoral
reviewed
Oct 1, 2025
atesgoral
reviewed
Oct 1, 2025
atesgoral
reviewed
Oct 1, 2025
Co-authored-by: Ateş Göral <[email protected]>
atesgoral
reviewed
Oct 1, 2025
Co-authored-by: Ateş Göral <[email protected]>
atesgoral
reviewed
Oct 1, 2025
Co-authored-by: Ateş Göral <[email protected]>
atesgoral
approved these changes
Oct 1, 2025
topherbullock
approved these changes
Oct 1, 2025
Merged
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 adds support for the
_meta
property in tool definitions, bringing the Ruby SDK to feature parity with the TypeScript SDK and other official MCP implementations. Previously, Ruby-based MCP servers couldn't attach metadata to tools, limiting interoperability with protocol extensions that rely on this standard field. Resolves issue #123 .How Has This Been Tested?
test/mcp/tool_test.rb
define
method approaches_meta
appears correctly in tool serialization fortools/list
responses_meta
field. Screenshot belowBreaking Changes
None. The
metadata
parameter is optional and existing code continues to work unchanged.Types of changes
Checklist
Additional context
The implementation follows the MCP specification exactly:
_meta
in the serialized tool schema (matching the spec)metadata
for consistency with other SDK methodsdefine
method approaches are supportedExample usage: