Add title to tools, prompts and resources #109
Merged
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.