Skip to content

Fix blob serialization in MCP output adaptation - #1

Open
DivyaMaddipudi wants to merge 1 commit into
mainfrom
fix-blob-serialization
Open

Fix blob serialization in MCP output adaptation#1
DivyaMaddipudi wants to merge 1 commit into
mainfrom
fix-blob-serialization

Conversation

@DivyaMaddipudi

Copy link
Copy Markdown
Owner

Summary

  • Fix SerializationException in adaptOutputDocument when downstream RPC v2 responses contain Blob fields as already-base64-encoded string Documents
  • Handle both document types: STRING passes through, BLOB encodes ByteBuffer to base64
  • Add unit tests covering all branches of the blob handling logic

Test plan

  • Unit tests pass: testAdaptOutputBlobFromBinaryDocument, testAdaptOutputBlobFromStringDocument, testAdaptOutputBlobFromUnsupportedDocumentTypeThrows, testAdaptOutputNullReturnsNull, testAdaptOutputStructureWithBlobFields
  • Full McpServerTest suite passes
  • Verified end-to-end against live MCP server (pv-swift-service-mcp GetPage with blob payloads)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant