Found during cdidx code-search audit. Evidence: standalone MCP tool failures intentionally sanitize ex.Message before returning JSON-RPC results, but src/CodeIndex/Mcp/McpToolHandlers.cs appends ex.Message directly for batch_query slot exceptions. Impact: a tool that throws inside a batch can expose bound values, local paths, SQL fragments, or content snippets that the standalone tools/call path was designed to suppress. Suggested fix: reuse the sanitized tool error message for batch slot errors while keeping structured category, suggestion, and retry metadata.
Found during cdidx code-search audit. Evidence: standalone MCP tool failures intentionally sanitize
ex.Messagebefore returning JSON-RPC results, butsrc/CodeIndex/Mcp/McpToolHandlers.csappendsex.Messagedirectly forbatch_queryslot exceptions. Impact: a tool that throws inside a batch can expose bound values, local paths, SQL fragments, or content snippets that the standalone tools/call path was designed to suppress. Suggested fix: reuse the sanitized tool error message for batch slot errors while keeping structured category, suggestion, and retry metadata.