feat: add title field for data types#410
Merged
jokemanfire merged 3 commits intomodelcontextprotocol:mainfrom Sep 8, 2025
Merged
feat: add title field for data types#410jokemanfire merged 3 commits intomodelcontextprotocol:mainfrom
title field for data types#410jokemanfire merged 3 commits intomodelcontextprotocol:mainfrom
Conversation
9a870ee to
50e0f43
Compare
50e0f43 to
ffcd738
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a title field to various data types in the MCP (Model Context Protocol) implementation to support the latest revision of the protocol. The change introduces optional human-readable titles for tools, resources, prompts, and other entities.
- Adds optional
titlefield to core data structures (Tool, Resource, Prompt, Implementation, etc.) - Updates all instantiation sites to include
title: Nonefor backward compatibility - Modifies macro generators to support the new title field
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/rmcp/src/model/tool.rs | Adds title field to Tool struct and updates constructor |
| crates/rmcp/src/model/resource.rs | Adds title field to RawResource and RawResourceTemplate structs |
| crates/rmcp/src/model/prompt.rs | Adds title field to Prompt and PromptArgument structs |
| crates/rmcp/src/model/content.rs | Updates RawContent enum variant and test instantiation |
| crates/rmcp/src/model.rs | Adds title field to Implementation and PromptReference structs |
| crates/rmcp-macros/src/tool.rs | Updates tool macro to support title attribute |
| crates/rmcp-macros/src/prompt.rs | Updates prompt macro to support title attribute |
| examples/servers/src/sampling_stdio.rs | Updates Tool instantiation with title field |
| examples/clients/src/streamable_http.rs | Updates Implementation instantiation with title field |
| examples/clients/src/sse.rs | Updates Implementation instantiation with title field |
| crates/rmcp/tests/test_elicitation.rs | Updates test implementations with title field |
| crates/rmcp/src/handler/server/prompt.rs | Updates PromptArgument instantiation with title field |
| crates/rmcp/tests/test_message_schema/*.json | Updates schema descriptions removing batch operations reference |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
jokemanfire
approved these changes
Sep 5, 2025
takumi-earth
pushed a commit
to earthlings-dev/rmcp
that referenced
this pull request
Jan 27, 2026
* feat(model): add title field to various structs * fix(test): fix test json schema * fix(model): allow boxed type in `ts_union` macro
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
to support the
titlefield in lastest revisionHow Has This Been Tested?
Breaking Changes
Types of changes
Checklist
Additional context