Skip to content

[BUG] [v0.0.7] cortex-mcp-types image content annotations are silently dropped on round-trip #53323

@marvinayisi

Description

@marvinayisi

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

N/A

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

  1. Create a tiny Rust crate depending on cortex-mcp-types from this workspace.
  2. Deserialize an image content block that includes valid annotations.
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions