Skip to content

feat!: type Annotations.lastModified as a string#956

Open
DaleSeo wants to merge 1 commit into
mainfrom
fix/last-modified-as-string
Open

feat!: type Annotations.lastModified as a string#956
DaleSeo wants to merge 1 commit into
mainfrom
fix/last-modified-as-string

Conversation

@DaleSeo

@DaleSeo DaleSeo commented Jul 5, 2026

Copy link
Copy Markdown
Member

Motivation and Context

The MCP 2025-11-25 schema types Annotations.lastModified as a plain string. Some schema-valid values, such as date-only strings or offset-less date-times, are not strict RFC 3339 and could previously cause a whole message to fail deserialization when nested in content or resource annotations.

This PR changes Annotations.last_modified to preserve lastModified as the schema-defined string instead of eagerly parsing it as DateTime<Utc>. The DateTime-based writer helpers still accept DateTime<Utc> and serialize RFC 3339 strings, while callers that need a typed read can use last_modified_datetime().

This is also consistent with Task.createdAt and Task.lastUpdatedAt, which are already represented as strings in rmcp. Keeping the raw string is lossless for proxying and forwarding, while the new accessor keeps DateTime ergonomics for callers that want best-effort typed parsing.

How Has This Been Tested?

Added tests

Breaking Changes

Yes. The public field Annotations.last_modified changes type from Option<DateTime<Utc>> to Option<String>.

The public API / SemVer check is expected to flag this field-type change. That is intentional for the v3 release.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

@DaleSeo DaleSeo changed the title feat!: type Annotations.lastModified as a string [DNM][v3] feat!: type Annotations.lastModified as a string Jul 5, 2026
@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 Jul 5, 2026
@DaleSeo DaleSeo changed the title [DNM][v3] feat!: type Annotations.lastModified as a string feat!: type Annotations.lastModified as a string Jul 5, 2026
@DaleSeo DaleSeo force-pushed the fix/last-modified-as-string branch from 13d6cd3 to df19f3d Compare July 5, 2026 13:55
@DaleSeo DaleSeo force-pushed the fix/last-modified-as-string branch from df19f3d to 22243e3 Compare July 5, 2026 14:03
@DaleSeo DaleSeo marked this pull request as ready for review July 5, 2026 14:55
@DaleSeo DaleSeo requested a review from a team as a code owner July 5, 2026 14:55
@DaleSeo DaleSeo self-assigned this Jul 5, 2026
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