fix(client): prefer title over name in Prompts and Resources lists#1230
Open
MukundaKatta wants to merge 2 commits intomodelcontextprotocol:mainfrom
Open
fix(client): prefer title over name in Prompts and Resources lists#1230MukundaKatta wants to merge 2 commits intomodelcontextprotocol:mainfrom
MukundaKatta wants to merge 2 commits intomodelcontextprotocol:mainfrom
Conversation
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.
Why
The Prompts and Resources tabs display the
namefield as the user-facing label even when the spec-blessedtitlefield is set. Per the MCP spec,titleis the human-friendly display name and should be preferred when present, withnameas a programmatic fallback.Closes #1226 (Prompts)
Closes #1227 (Resources)
What
PromptsTab.tsxtitle?: stringto the localPrompttype.prompt.title || prompt.name.ResourcesTab.tsxresource.title || resource.name.template.title || template.name.titleattribute on the wrapping element): same.ResourceandResourceTemplatetypes already includetitlevia@modelcontextprotocol/sdk/types.js, so no type changes were needed inResourcesTab.tsx.Tested
Manual verification path: load a server that returns prompts/resources with both
nameandtitleset; the label and selected-item header now showtitle. Servers that only setnameare unchanged (fallback path).