Project
cortex
Description
A valid embedded MCP resource with top-level annotations deserializes into Content, but the annotations disappear when the value is serialized again.
Error Message
EMBEDDED_RESOURCE_ANNOTATIONS_ROUNDTRIP={
"type": "resource",
"resource": {
"uri": "file:///tmp/demo.txt",
"text": "hello"
}
}
Debug Logs
System Information
Cortex crate: cortex-mcp-types 0.0.7
Commit: 7954d02
Date: 2026-04-10
OS: macOS
Screenshots
https://github.com/marvinayisi/issue-images/blob/main/mcp-embedded-resource-annotations-20260410-074112.png
Steps to Reproduce
- Create a tiny Rust crate depending on
cortex-mcp-types from this workspace.
- Deserialize an embedded resource content block that includes valid top-level
annotations.
- Serialize the
Content back to JSON and inspect the output.
Expected Behavior
The embedded resource annotations should survive the round-trip.
Actual Behavior
The round-tripped content loses the top-level annotations entirely.
Additional Context
- Authoritative spec:
https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/refs/heads/main/schema/2024-11-05/schema.ts
- Code path:
/Users/odeili/Projects/platform/cortex/src/cortex-mcp-types/src/content.rs
- Duplicate check on 2026-04-10:
cortex-mcp-types EmbeddedResource annotations dropped round-trip
Project
cortex
Description
A valid embedded MCP resource with top-level
annotationsdeserializes intoContent, but the annotations disappear when the value is serialized again.Error Message
Debug Logs
System Information
Screenshots
https://github.com/marvinayisi/issue-images/blob/main/mcp-embedded-resource-annotations-20260410-074112.png
Steps to Reproduce
cortex-mcp-typesfrom this workspace.annotations.Contentback to JSON and inspect the output.Expected Behavior
The embedded resource
annotationsshould survive the round-trip.Actual Behavior
The round-tripped content loses the top-level
annotationsentirely.Additional Context
https://raw.githubusercontent.com/modelcontextprotocol/modelcontextprotocol/refs/heads/main/schema/2024-11-05/schema.ts/Users/odeili/Projects/platform/cortex/src/cortex-mcp-types/src/content.rscortex-mcp-types EmbeddedResource annotations dropped round-trip