-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Encourage title properties/usage for objects/resources likely t… #663
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
Encourage title properties/usage for objects/resources likely t… #663
Conversation
d7801b2 to
7340d98
Compare
|
Hi @ZachGerman - interested in your thoughts on a couple of things, just thinking out loud:
|
connor4312
left a comment
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.
MCP already uses the title for the "displayName" in ToolAnnotations.title. Could we normalize one direction or the other?
| ```json | ||
| { | ||
| "name": "get_weather_data", | ||
| "displayName": "Weather Data Retriever", |
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.
This doesn't appear to be represented in the spec change and is duplicative with existing ToolAnnotations.title
|
Hi @ZachGerman - this is definitely a useful addition and we'd like to add it to the draft spec, but with the following changes:
Realize this is a nontrivial set of edits and we're on a fairly tight schedule for the spec release, so if you don't have time/bandwidth in the next day or so we're happy to make the changes. Just LMK! |
6b634a1 to
f00ada8
Compare
Done. Please let me know if anything else needs changed. I'm on-call this week, so I won't finish the server transport until next week, but this PR is small enough to keep up with during my on-call. |
…epresented in a UI
f00ada8 to
1c54a77
Compare
|
Awesome! Will review shortly but also please fix the merge conflicts when you have a chance. Thanks for the quick turnaround! |
|
Ugh sorry to do this to you but it looks like you need to rerun |
Should be fixed now. |
|
Hi @ZachGerman - had to make one change, Having pushed the change I can't merge it, but it should go in shortly. Thanks again for doing this! |
bhosmer-ant
left a comment
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.
LGTM!
ihrpr
left a comment
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.
do we also need to update PromptReference?
schema/draft/schema.ts
Outdated
|
|
||
| /** | ||
| * Describes the name and version of an MCP implementation. | ||
| * Base interface for metadata with name and title (display name) properties. |
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.
should we hint that name is an identifier?
| * Base interface for metadata with name and title (display name) properties. | |
| * Base interface for metadata with name (identifier) and title (display name) properties. |
yes! thanks for catching |
ihrpr
left a comment
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.
LGTM
…l#663 Signed-off-by: luyunkui <luyunkui@58.com>
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)
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.
Commit 1c54a77 (PR #663) incorrectly added 'name' and 'title' fields to ResourceContents examples in the documentation. According to the schema, these fields only exist on Resource objects (used in resources/list), not on ResourceContents (TextResourceContents/BlobResourceContents) which are used in: - resources/read responses - embedded resources in prompts and tools - resource update notifications This commit removes the incorrectly documented fields to match the actual schema definition where ResourceContents only contains: - uri (required) - mimeType (optional) - text or blob field depending on content type
) Commit 1c54a77 (PR #663) incorrectly added 'name' and 'title' fields to ResourceContents examples in the documentation. According to the schema, these fields only exist on Resource objects (used in resources/list), not on ResourceContents (TextResourceContents/BlobResourceContents) which are used in: - resources/read responses - embedded resources in prompts and tools - resource update notifications This commit removes the incorrectly documented fields to match the actual schema definition where ResourceContents only contains: - uri (required) - mimeType (optional) - text or blob field depending on content type
Encourage UI-friendly naming by introducing a dedicated optional
titleproperty across the specification and updating all related examples to include it.titlefield toresource,tool,prompt,clientInfo, andserverInfodefinitions in the spec.titleentries where they're likely to be used.Motivation and Context
By introducing
titleas a dedicated property, we ensure clarity and consistency in how data is surfaced to end users, improving both developer experience and user-facing usability as the protocol evolves.Breaking Changes
Will users need to update their code or configurations? No. According to the language added to the spec, "if no
titleis provided,nameshould be used for display purposes". Thus, implementations currently leveragingnamevariables for display will be preserved.Types of changes
Checklist
To be added to docs if/when this PR is published to an official spec version:
Naming conventions:
nameandtitle. Thenameis intended for programmatic or logical use, whiletitleis intended for UI and end-user contexts — optimized to be human-readable and easily understood, even by those unfamiliar with domain-specific terminology.