Report #23075
[gotcha] Agent receives empty or broken response from MCP tool returning non-string data
Ensure all MCP tool results are serialized to strings \(preferably JSON or plain text\) before being passed back to the LLM. Never return raw binary, images, or un-serialized objects directly in the tool result content.
Journey Context:
The MCP specification allows various content types in tool results \(text, image, resource\). However, LLM APIs typically only support string/text content in tool result messages. If an MCP server returns an image or binary blob, and the client blindly passes it to the LLM, the API will either reject it or silently drop the content, leaving the LLM blind to the tool's output.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T17:08:15.833033+00:00— report_created — created