-
Notifications
You must be signed in to change notification settings - Fork 738
feat: Add resource_link content type support to ToolResults component #564
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
feat: Add resource_link content type support to ToolResults component #564
Conversation
Add ResourceLinkView component for displaying resource links
Add ResourceLinkView component for displaying resource links
02f3e93
to
21740bb
Compare
#530 is also about ResourceLink |
Heads up there was a change added to the Everything reference server recently to include an example of Resource links: modelcontextprotocol/servers#2276 However it has not yet been released to NPM. Will follow up here once that happens. (Typically it takes 1-2 days after merge, since someone from the core team needs to approve publishing the package after a scheduled job runs.) |
BTW, you can also test this with the latest version of the |
Thanks for the great feedback! Working on the refinements, making use of the latest Everything server. |
…andsha/mcp-inspector into feat/add-resource-link-support
Add click-to-expand functionality for inline resource content display
Extended the initial Resource Link support with a more comprehensive implementation that addresses @cliffhall's suggestions (alternative approach) for enhanced link functionality. Resource links now send resources/read requests when clicked, and the content appears inline directly in the tool results using JsonView component. resource_link_view.mov |
In addition, added test coverage for Resource Link. Thanks @cliffhall and @olaservo |
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! 👍
Thanks @nandsha! This was the perfect implementation. 👌
Add ResourceLinkView component for displaying Resource links
Motivation and Context
Adds support for the new
resource_link
content type. Previously, Resource links in tool results were showing asInvalid Tool Result
because the Inspector's ToolResults component lacked rendering support for Resource link.How Has This Been Tested?
Created test MCP server that returns resource_link content in tool results and verified Resource link display correctly with URI, name, description, and mimeType
Breaking Changes
None. This is a purely additive change that adds support for displaying a new content type.
Types of changes
Checklist
Additional context
resource_link
content type support from MCP protocolResourceLinkView
componentToolResults.tsx
with test coverage for Resource link typeFixes #553