Project
cortex
Description
A valid MCP image content block with annotations deserializes into Content, but the annotations disappear when the value is serialized again.
Error Message
IMAGE_ANNOTATIONS_ROUNDTRIP={
"type": "image",
"data": "aGVsbG8=",
"mimeType": "image/png"
}
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-image-annotations-20260410-074112.png
Steps to Reproduce
- Create a tiny Rust crate depending on
cortex-mcp-types from this workspace.
- Deserialize an image content block that includes valid
annotations.
- Serialize the
Content back to JSON and inspect the output.
Expected Behavior
The annotations object should survive the round-trip.
Actual Behavior
The round-tripped content loses 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 ImageContent annotations dropped round-trip
Project
cortex
Description
A valid MCP image content block with
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-image-annotations-20260410-074112.png
Steps to Reproduce
cortex-mcp-typesfrom this workspace.annotations.Contentback to JSON and inspect the output.Expected Behavior
The
annotationsobject should survive the round-trip.Actual Behavior
The round-tripped content loses
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 ImageContent annotations dropped round-trip