-
Notifications
You must be signed in to change notification settings - Fork 309
feat: add MCP resource_link (2025-06-18) #381
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
base: main
Are you sure you want to change the base?
Conversation
28057c6
to
c9fde77
Compare
c34d426
to
c4acd32
Compare
0eff32a
to
aa4fef7
Compare
aa4fef7
to
5812189
Compare
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.
Pull Request Overview
This PR adds support for the MCP ResourceLink content block to align with the MCP schema specification dated 2025-06-18. The ResourceLink allows tools and prompts to reference server resources without embedding their full payloads, enabling on-demand fetching.
Key changes include:
- Addition of
RawContent::ResourceLink
andPromptMessageContent::ResourceLink
variants with serde tag "resource_link" - Helper constructors for creating resource link content blocks
- JSON schema updates reflecting the new content type structure
- Updated embedded text to use "text/plain" MIME type for compliance
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
crates/rmcp/src/model/content.rs |
Adds ResourceLink variant to RawContent enum and constructor methods |
crates/rmcp/src/model/prompt.rs |
Adds ResourceLink variant to PromptMessageContent enum and constructor |
crates/rmcp/tests/test_message_schema/*.json |
Updates JSON schemas to include new ResourceLink definitions and structure |
Comments suppressed due to low confidence (1)
crates/rmcp/src/model/content.rs:1
- This test function is placed outside the
mod tests
block. It should be moved inside the existing test module to maintain consistent test organization.
//! Content sent around agents, extensions, and LLMs
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Align rmcp content models with MCP 2025-06-18 by adding the ResourceLink content block.
What’s included
Why
Spec references (2025-06-18)
Notes