Skip to content

Spec conformance: meta support and spec updates#414

Closed
aharvard wants to merge 2 commits intomodelcontextprotocol:mainfrom
aharvard:feat/spec-conformance-_meta-support
Closed

Spec conformance: meta support and spec updates#414
aharvard wants to merge 2 commits intomodelcontextprotocol:mainfrom
aharvard:feat/spec-conformance-_meta-support

Conversation

@aharvard
Copy link
Copy Markdown
Contributor

@aharvard aharvard commented Sep 3, 2025

This PR updates the Rust SDK to align more closely with the 2025-06-18 Model Context Protocol specification and adds first-class support for _meta.

Summary

  • Protocol/version: set LATEST to 2025-06-18
  • _meta support: added to text and image content, and embedded resources
  • Annotated model: rename timestamp -> last_modified (schema lastModified)
  • Prompt helpers: added function to create text messages with _meta
  • Tests: kept existing Rust tests passing locally; Python-dependent tests are skipped due to local env

Key changes

  • crates/rmcp/src/model.rs
    • Update LATEST constant to 2025-06-18
  • crates/rmcp/src/model/content.rs
    • Add optional _meta to RawTextContent and RawImageContent
    • Comments clarifying _meta intent and examples
  • crates/rmcp/src/model/prompt.rs
    • new_text_with_meta helper for convenience
    • Test updates to include _meta in RawImageContent case
  • crates/rmcp/src/model/annotated.rs
    • Rename timestamp to last_modified and update accessors
  • crates/rmcp/tests/test_message_schema.rs
    • Reviewed; remains compatible

Notes

  • Local environment lacks Python, so Python-dependent tests were not executed; Rust tests pass.
  • Happy to extend _meta to any additional surfaced interfaces if maintainers prefer a broader/narrower interpretation of where _meta is allowed in the June 18, 2025 spec.

Follow-ups (open to maintainer guidance)

  • Confirm the precise set of interfaces that should expose _meta in the SDK surface area
  • Add helpers for setting params._meta on requests (if desired)
  • Tighten schema/tests once final interpretation is agreed

Thanks!

@github-actions github-actions bot added T-test Testing related changes T-config Configuration file changes T-core Core library changes T-model Model/data structure changes labels Sep 3, 2025
@aharvard aharvard closed this Sep 3, 2025
@aharvard aharvard deleted the feat/spec-conformance-_meta-support branch September 3, 2025 12:37
@aharvard aharvard changed the title Spec conformance: _meta support and spec updates Spec conformance: meta support and spec updates Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-config Configuration file changes T-core Core library changes T-model Model/data structure changes T-test Testing related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant