Add title to tools, prompts and resources#109
Merged
topherbullock merged 1 commit intomodelcontextprotocol:mainfrom Aug 20, 2025
Merged
Add title to tools, prompts and resources#109topherbullock merged 1 commit intomodelcontextprotocol:mainfrom
topherbullock merged 1 commit intomodelcontextprotocol:mainfrom
Conversation
This was referenced Aug 22, 2025
koic
added a commit
that referenced
this pull request
Aug 23, 2025
Follow-up to #109. The introduction of `title` in #109 is still a draft and is not supported in the latest specification, `Version 2025-06-18 (latest)`. In this PR, the README.md will be updated to mention this point and restore the references to the removed `annotations.title`. This aims to inform users that, as of `Version 2025-06-18 (latest)`, the use of `annotations.title` is considered stable. Additionally, separate validation for these parameters could be added. Please refer to the following comment regarding `annotations.title` and `title`: modelcontextprotocol/modelcontextprotocol#663 (comment)
koic
added a commit
that referenced
this pull request
Aug 29, 2025
Follow-up to #109. `title` has also been added to `serverInfo` and `clientInfo` by modelcontextprotocol/modelcontextprotocol#663. Since `clientInfo` is not treated as product code, support is implemented only in `serverInfo`. See also https://modelcontextprotocol.io/specification/2025-06-18/schema#implementation.
Merged
9 tasks
koic
added a commit
that referenced
this pull request
Nov 21, 2025
For example, the `title` introduced in #109 is not supported in the latest stable protocol version "2025-06-18": https://modelcontextprotocol.io/specification/2025-06-18 It is supported in the Draft of the next version: https://modelcontextprotocol.io/specification/draft In other words, the fact that the Ruby SDK treats "2025-06-18" as the default protocol version while `title` is only supported in the Draft results in an inconsistency. Because of this, a new version `"Draft"` has been added to the list of supported versions. Its value follows the schema below and is defined as `DRAFT-2025-v3`: https://github.com/modelcontextprotocol/modelcontextprotocol/blob/14ec41c/schema/draft/schema.ts#L15 It was also considered to continue using the latest stable version "2025-06-18" as the Ruby SDK default instead of the Draft. However, in that case, users would need to explicitly specify `MCP::Server.new(protocol_version: 'DRAFT-2025-v3')`, which adds extra burden. In this PR, Draft is made the default in order to provide the following benefits: - Users are likely to prefer using the Draft version over the latest stable version - No need to specify the `protocol_version` option when initializing `MCP::Server` - Users generally do not need to know the internal development value `DRAFT-2025-v3` The primary case for specifying `protocol_version` explicitly is when strict adherence to a particular version is required. However, it seems more practical to prioritize use cases where backward-compatible features, including those from the Draft, are desirable. This is the rationale behind making the Draft version the default. In addition, making the Draft version the default protocol version preserves backward compatibility for `MCP::Server`. NOTE: `DRAFT-2025-v3` is a development code, so its value cannot be set externally. It is applied either when `protocol_version` is omitted or when `nil` is set explicitly, such as with `MCP::Configuration.new(protocol_version: nil)`. This prevents users from creating implementations that depend on development codes like `DRAFT-2025-v3`.
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.
This implements the spec change from modelcontextprotocol/modelcontextprotocol#663 to improve user experience by allowing servers to provide a human-friendly names, called "title", for tools, prompts and resources.
Motivation and Context
There is a worklog to apply the changes to all SDKs but Ruby didn't seem to be listed, so figured I'd go ahead and open a PR!
How Has This Been Tested?
I've tested the gem locally with each object type from my own Rails MCP server. I also tested both scenarios - with title added vs omitted and both worked as expected.
Breaking Changes
No, this is an optional field
Types of changes
Checklist
Additional context
When a title is not added, it will not be included in the response. I assume this is the expected behavior here vs returning a blank title? That's my intuition but curious to hear other's thoughts.