Skip to content

Clarify client handling of embedded binary tool resources - #1762

Open
luisangelrod wants to merge 1 commit into
modelcontextprotocol:mainfrom
luisangelrod:investigate-1261-pdf-embedded-resource
Open

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

Conversation

@luisangelrod

Copy link
Copy Markdown

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

Addresses #1261.

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.

1 participant