You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes two bugs in the dev MCP server (/v1/mcp) affecting LLM/MCP clients:
Tool results missing from content: CommandResult.toToolResponse() returned an empty content list, putting results only in _meta/structuredContent, which standard MCP clients don't read. Status-only commands (findKeyspaces, insertMany, …) appeared empty to the LLM. The full {data, status, errors} envelope is now also serialized as a text part in content.
Advertised filter schema didn't match the accepted wire format: the tools/list inputSchema leaked internal Java fields (filterClause/json, etc.) for FilterDefinition, SortDefinition, UpdateClause, and FindAndRerankSort. New McpClauseSchemaCustomizer advertises these as plain objects with a description and example of the Data API syntax; @ToolArg descriptions updated to match.
Also converts failures that previously surfaced as opaque JSON-RPC -32603 errors (e.g. context-building failures) into proper isError tool responses with a message, so agents can self-correct.
Testing: new/updated unit tests (McpClauseSchemaCustomizerTest, CommandResultToToolResponseTest) and integration tests (non-empty content for findKeyspaces; find succeeds with the filter example taken verbatim from the advertised schema; invalid filter returns a tool error). All 57 MCP ITs and the full unit suite pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does:
Fixes two bugs in the dev MCP server (
/v1/mcp) affecting LLM/MCP clients:Tool results missing from
content:CommandResult.toToolResponse()returned an emptycontentlist, putting results only in_meta/structuredContent, which standard MCP clients don't read. Status-only commands (findKeyspaces,insertMany, …) appeared empty to the LLM. The full{data, status, errors}envelope is now also serialized as a text part incontent.Advertised filter schema didn't match the accepted wire format: the
tools/listinputSchema leaked internal Java fields (filterClause/json, etc.) forFilterDefinition,SortDefinition,UpdateClause, andFindAndRerankSort. NewMcpClauseSchemaCustomizeradvertises these as plain objects with a description and example of the Data API syntax;@ToolArgdescriptions updated to match.Also converts failures that previously surfaced as opaque JSON-RPC
-32603errors (e.g. context-building failures) into properisErrortool responses with a message, so agents can self-correct.Testing: new/updated unit tests (
McpClauseSchemaCustomizerTest,CommandResultToToolResponseTest) and integration tests (non-emptycontentforfindKeyspaces;findsucceeds with the filter example taken verbatim from the advertised schema; invalid filter returns a tool error). All 57 MCP ITs and the full unit suite pass.Which issue(s) this PR fixes:
Fixes #
Checklist