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-06-29 17:11:02 -04:00
2026-06-09 07:43:21 -04:00
2026-02-16 20:14:18 -05:00

Tools are the building blocks of functionality for our internal MCP server.

Each tool is a self-contained unit of functionality that can be invoked by the MCP client to perform a specific task. To test the MCP with Claude in development make sure to run with the following command to ensure that the MCP server trusts the mkcert root CA certificate.

NODE_EXTRA_CA_CERTS=$(mkcert -CAROOT)/rootCA.pem claude