Files
石岳峰andsyf2211 8b5f9cd456 fix(mcp): return text content for empty list tool results (#12864)
* fix(mcp): return text content for empty list tool results

When MCP list tools return zero items, success([]) previously produced
an empty content array. Anthropic's MCP connector rejects that format.

Return a single JSON text block for empty arrays so clients can
distinguish no results from a broken tool response.

Fixes #12858

* test(mcp): handle empty list sentinel in integration tests

Add parseMcpListContent helper for the [] sentinel block and update
list tool tests that can receive zero results.

* test(mcp): fix list_collections type assertion in integration test

---------

Co-authored-by: syf2211 <syf2211@users.noreply.github.com>
2026-07-10 19:34:56 -04:00
..
2026-05-06 21:10:51 -04:00