MCP Tool Only Returns First Row via - Responses API

Hi all,

We’ve deployed an MCP server on Google Cloud Run, using the latest Docker image from MCP Toolbox for Databases. We currently have a single tool configured, which connects to a MySQL instance and executes a fixed query that selects 5 rows from one of our tables.

When testing with the MCP Inspector, everything works as expected — it connects, executes the tool, and returns all 5 rows in the output:

However, when we switch to using the Responses API (via streamable HTTP), the request succeeds and the tool is executed — but we only receive the first row of the result. No errors are thrown.

I dug a little deeper and inspected the actual MCP call object. Here’s a sanitized version of the response:

McpCall(
  name='test_sql_tool',
  server_label='my_mcp_server',
  output='{"Field1": "...", "Field2": "...", "Field3": "..."}'
)

Even though the underlying SQL query returns 5 rows (verified locally and through MCP Inspector), the output field contains just a single JSON object — which seems to correspond to only the first row of the result set.

Has anyone experienced a similar issue with tools returning only partial results? Is there something in the tool implementation or output schema that might restrict output to a single item?


Minor related issue:

Also noticing that SSE (Server-Sent Events) doesn’t seem to work from the Responses API, even though the same tool and server work fine via the MCP Inspector. Any known limitations when using SSE with Cloud Run or specific headers/settings we should check?

Thanks in advance for any insights!


Update:

I retested everything using the Agents SDK, and both SSE and streamable HTTP worked correctly — full results were returned as expected. So it seems the issue is isolated to the Responses API interface specifically.

4 Likes

Noticed the same issue - thank you for flagging this. Took a while to find anyone else who has experienced this. 3 months later and this hasn’t been fixed. This means that tool results with interleaved text + images don’t work.

I’ve created this repo to reproduce the issue: GitHub - arcaputo3/openai-responses-mcp-bug: Demonstrates a bug with MCP handling via the OpenAI Responses API

I am facing the same issue at the moment

Me unfortunately too.
Just deployed my first custom MCP server on Render and tried to connect it to my custom Chat session in OpenAI dashboard. It successfully calls the tool but shows and relates only to the first item in the list which is also converted to a dictionary. Any bypassing of this problem?

Hi all!

It’s very surprising and disappointing that this problem hasn’t been fixed yet…

But I’ll let you know our workaround. Since what we wanted was to deploy an agent, we just used the Agents SDK, and then switched to LangChain. In both cases, MCP tool call responses work correctly. I haven’t tested anything with images, like @rcaputo3 suggested.

I know there’s a newer version of LangChain/LangGraph that is simpler, and makes it quite similar to the Agents SDK. So I wouldn’t suggest using one over the other, just use whatever fits your workflow better.

I found a workaround inspired by the responses expected by the Apps SDK. The solution is to put the whole response in the structuredContent field. So the MCP response needs to look like this:

{
"structuredContent": {
"listOutput": [...]
}
}

1 Like