feat(vmcp): add support for ResourceLink content type#4023
Open
Sanskarzz wants to merge 1 commit intostacklok:mainfrom
Open
feat(vmcp): add support for ResourceLink content type#4023Sanskarzz wants to merge 1 commit intostacklok:mainfrom
Sanskarzz wants to merge 1 commit intostacklok:mainfrom
Conversation
Signed-off-by: Sanskarzz <sanskar.gur@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4023 +/- ##
==========================================
+ Coverage 68.53% 68.57% +0.04%
==========================================
Files 441 441
Lines 44970 44979 +9
==========================================
+ Hits 30820 30846 +26
+ Misses 11758 11739 -19
- Partials 2392 2394 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
[WIP]
Summary
This PR implements support for the
ResourceLinkcontent type (type discriminant "resource_link") in the vMCP bridge layer. Previously,ResourceLinkcontent returned by backend MCP servers was unrecognized by the conversion layer, causing it to fall through to "unknown" and eventually be emitted as empty text, losing critical resource pointers and metadata.Key Changes
pkg/vmcp/types.goto include Name and Description fields, allowing it to faithfully represent a ResourceLink .contentTypeLinkconstant to pkg/vmcp/conversion/content.go. UpdatedConvertMCPContentto detectmcp.ResourceLinkvia type assertion and map it tovmcp.Content. UpdatedToMCPContentto reconstructmcp.ResourceLinkusingmcp.NewResourceLink.TestConvertMCPContentandTestToMCPContentinconversion_test.go. AddedTestResourceLinkRoundTripto verify that data is preserved when converting in both directions.Validation Results
All tests in pkg/vmcp/conversion and pkg/vmcp/server/adapter pass. go vet is clean.
Fixes #3960