-
Notifications
You must be signed in to change notification settings - Fork 310
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
aa4fef7
to
5812189
Compare
- Add RawContent::ResourceLink (serde tag "resource_link") - Add PromptMessageContent::ResourceLink for prompts - Constructors: RawContent::resource_link, Content::resource_link - Embedded text uses text/plain - Keep camelCase compliance for mimeType - Unit tests for resource_link and embedded text Spec: ContentBlock includes ResourceLink and EmbeddedResource (DRAFT-2025-v3)
0a53835
to
305b58e
Compare
Change 'can be display' to 'can be displayed' in module documentation
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 MCP ResourceLink content block support to align rmcp with the MCP 2025-06-18 specification, enabling references to server resources without embedding their payloads.
- Adds ResourceLink content type with URI-based resource referencing
- Updates embedded text MIME type to use proper "text/plain" instead of generic "text"
- Includes comprehensive test coverage for new functionality
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 constructors for resource linking |
crates/rmcp/src/model/prompt.rs | Adds ResourceLink support to PromptMessageContent for prompts/get |
crates/rmcp/tests/test_message_schema/*.json | Updates JSON schema files to reflect new ResourceLink type definitions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@@ -1,5 +1,7 @@ | |||
//! Content sent around agents, extensions, and LLMs | |||
//! The various content types can be display to humans but also understood by models | |||
//! NOTE: This file models MCP ContentBlock union types. Keep in sync with MCP draft schema. |
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.
The comment refers to 'MCP draft schema' but the PR description indicates this aligns with MCP 2025-06-18. Consider updating to specify the exact schema version for clarity.
//! NOTE: This file models MCP ContentBlock union types. Keep in sync with MCP draft schema. | |
//! NOTE: This file models MCP ContentBlock union types. Keep in sync with MCP 2025-06-18 schema. |
Copilot uses AI. Check for mistakes.
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