Skip to content

Clarify client handling of embedded binary tool resources - #1762

Merged
jeffhandley merged 1 commit into
modelcontextprotocol:mainfrom
luisangelrod:investigate-1261-pdf-embedded-resource
Aug 5, 2026
Merged

Clarify client handling of embedded binary tool resources#1762
jeffhandley merged 1 commit into
modelcontextprotocol:mainfrom
luisangelrod:investigate-1261-pdf-embedded-resource

Conversation

@luisangelrod

@luisangelrod luisangelrod commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • document that binary embedded resources are sent as MCP resource contents without SDK-side format conversion
  • clarify that rendering and model availability depend on the client, with a text fallback suggested for unsupported formats
  • add a protocol serialization regression for an embedded PDF resource
  • add a server-path regression that verifies the complete JSON-RPC response and round-trip

Findings

The SDK preserves the PDF MIME type and emits the MCP binary-resource shape:

{
  "result": {
    "content": [
      {
        "type": "resource",
        "resource": {
          "uri": "file:///mypdf.pdf",
          "mimeType": "application/pdf",
          "blob": "JVBERi0xLjcK"
        }
      }
    ]
  },
  "id": 55,
  "jsonrpc": "2.0"
}

This indicates that the PDF-to-image behavior reported in #1261 occurs after the SDK emits the tool result.

Validation

Resolves #1261.

@jeffhandley jeffhandley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @luisangelrod!

@jeffhandley
jeffhandley merged commit 24b122a into modelcontextprotocol:main Aug 5, 2026
17 of 18 checks passed
@jeffhandley jeffhandley mentioned this pull request Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Returning an EmbeddedResourceBlock from a tool do not work with Claude Desktop

2 participants