Skip to content

Conversation

@ZachGerman
Copy link
Contributor

@ZachGerman ZachGerman commented Jun 6, 2025

Encourage UI-friendly naming by introducing a dedicated optional title property across the specification and updating all related examples to include it.

  • Added optional title field to resource, tool, prompt, clientInfo, and serverInfo definitions in the spec.
  • Updated JSON examples to include title entries where they're likely to be used.

Motivation and Context

By introducing title as 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 title is provided, name should be used for display purposes". Thus, implementations currently leveraging name variables for display will be preserved.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

To be added to docs if/when this PR is published to an official spec version:

Naming conventions:

  • Objects with names expose two distinct properties: name and title. The name is intended for programmatic or logical use, while title is intended for UI and end-user contexts — optimized to be human-readable and easily understood, even by those unfamiliar with domain-specific terminology.

@bhosmer-ant
Copy link
Contributor

Hi @ZachGerman - interested in your thoughts on a couple of things, just thinking out loud:

  • the "just use name if displayName is not provided" is nice for new client / old server compatibility. For old client / new server situations, it will mean tool names might be less readable than previously. I don't think this is a dealbreaker, but wanted to flag it.
  • wonder if you've thought about when to use displayName vs. annotations.title for tools. We might want to give some guidance about that in the new language.

@dsp-ant dsp-ant moved this from Consulting to In Review in Standards Track Jun 10, 2025
Copy link
Contributor

@connor4312 connor4312 left a 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",
Copy link
Contributor

@connor4312 connor4312 Jun 10, 2025

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

@bhosmer-ant
Copy link
Contributor

Hi @ZachGerman - this is definitely a useful addition and we'd like to add it to the draft spec, but with the following changes:

  • instead of adding displayName as a top-level property, create a BaseMetadata interface that contains name and title (rather than displayName)
  • for any type that contains name, inherit from that interface instead. (This will give us a place to make further additions later.)
  • for the documentation (in addition to changing displayName to title globally) we'd want to add language in Tool noting that in addition to the "first title then fall back to name" precedence order you specify elsewhere, for tools it should be "first title then annotations.title then name"

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!

@ZachGerman ZachGerman force-pushed the feature/displayName branch 2 times, most recently from 6b634a1 to f00ada8 Compare June 11, 2025 21:29
@ZachGerman
Copy link
Contributor Author

Hi @ZachGerman - this is definitely a useful addition and we'd like to add it to the draft spec, but with the following changes:

* instead of adding `displayName` as a top-level property, create a `BaseMetadata` interface that contains `name` and `title` (rather than `displayName`)

* for any type that contains `name`, inherit from that interface instead. (This will give us a place to make further additions later.)

* for the documentation (in addition to changing `displayName` to `title` globally) we'd want to add language in `Tool` noting that in addition to the "first `title` then fall back to `name`" precedence order you specify elsewhere, for tools it should be "first `title` then `annotations.title` then `name`"

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!

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.

@ZachGerman ZachGerman force-pushed the feature/displayName branch from f00ada8 to 1c54a77 Compare June 11, 2025 21:36
@ZachGerman ZachGerman changed the title Encourage displayName properties/usage for objects/resources likely t… Encourage title properties/usage for objects/resources likely t… Jun 11, 2025
@bhosmer-ant
Copy link
Contributor

Awesome! Will review shortly but also please fix the merge conflicts when you have a chance. Thanks for the quick turnaround!

@bhosmer-ant
Copy link
Contributor

Ugh sorry to do this to you but it looks like you need to rerun npm run generate:json 🙏 (also I'm not sure why the PR is still showing "out of date with the base branch" after your merge, but as long as there are no conflicts it should be innocuous)

@ZachGerman
Copy link
Contributor Author

Ugh sorry to do this to you but it looks like you need to rerun npm run generate:json 🙏 (also I'm not sure why the PR is still showing "out of date with the base branch" after your merge, but as long as there are no conflicts it should be innocuous)

Should be fixed now.

@bhosmer-ant bhosmer-ant enabled auto-merge June 12, 2025 02:07
@bhosmer-ant
Copy link
Contributor

Hi @ZachGerman - had to make one change, Root.name was a different beast than the rest (optional, so making it mandatory would be bc-breaking, and paired with a URI, which arguably can serve as a machine-friendly id). Also it's not in your original list of candidates, so I suspect it might've been an accidental change.

Having pushed the change I can't merge it, but it should go in shortly. Thanks again for doing this!

@bhosmer-ant bhosmer-ant self-requested a review June 12, 2025 02:16
bhosmer-ant
bhosmer-ant previously approved these changes Jun 12, 2025
Copy link
Contributor

@bhosmer-ant bhosmer-ant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@ihrpr ihrpr left a 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?


/**
* Describes the name and version of an MCP implementation.
* Base interface for metadata with name and title (display name) properties.
Copy link
Contributor

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?

Suggested change
* Base interface for metadata with name and title (display name) properties.
* Base interface for metadata with name (identifier) and title (display name) properties.

@bhosmer-ant
Copy link
Contributor

do we also need to update PromptReference?

yes! thanks for catching

@bhosmer-ant bhosmer-ant requested a review from ihrpr June 12, 2025 22:14
Copy link
Contributor

@ihrpr ihrpr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bhosmer-ant bhosmer-ant merged commit 8719898 into modelcontextprotocol:main Jun 13, 2025
@github-project-automation github-project-automation bot moved this from In Review to Approved in Standards Track Jun 13, 2025
@ihrpr ihrpr mentioned this pull request Jun 17, 2025
YunKuiLu added a commit to YunKuiLu/modelcontextprotocol that referenced this pull request Jun 28, 2025
koic added a commit to modelcontextprotocol/ruby-sdk 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 to modelcontextprotocol/ruby-sdk 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.
dsp-ant added a commit that referenced this pull request Sep 19, 2025
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
dsp-ant added a commit that referenced this pull request Sep 19, 2025
)

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
dsp-ant added a commit that referenced this pull request Nov 24, 2025
Signed-off-by: luyunkui <luyunkui@58.com>
Co-authored-by: Cliff Hall <cliff@futurescale.com>
Co-authored-by: David Soria Parra <167242713+dsp-ant@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Approved

Development

Successfully merging this pull request may close these issues.

5 participants