Skip to content

batch_query response has no top-level partial-failure summary #1616

Description

@Widthdom

Summary

batch_query catches each per-query exception and adds {tool, error} to the results array, then always returns a successful (200-shaped) MCP response. There is no top-level summary field telling the client "N of M queries failed." A consumer iterating the response array must scan every element to discover any failed.

This is distinct from #1472 (which asks for a failure_scope field categorizing whether errors were cascading or isolated). C214 is about the simpler precondition: the aggregate response should signal that any failure happened at all, with counts. #1472's classification is a follow-on once the aggregate signal exists.

Where

  • src/CodeIndex/Mcp/McpToolHandlers.cs:1207-1218 (batch_query result aggregation)

Suggested approach

Add top-level total_count, success_count, failure_count, and partial_failure: bool fields to the batch_query response envelope. This pairs naturally with #1472 (failure_scope) and #1537 (per-query elapsed) without overlapping either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions