Skip to content

Report when semantic query results are truncated #12

Description

@vara-bonthu

Description

The server applies a default row LIMIT of 1000 when no limit is provided. If more than 1000 groups exist, the response silently returns the first 1000 without indicating that the result is incomplete.

This can cause an agent or application to present a partial result as a complete answer. It also contradicts the documentation stating that requests are refused rather than truncated.

Proposed solution

  • Execute bounded queries with LIMIT requestedLimit + 1
  • Remove the extra row before returning the response.
  • Add limit and hasMore or truncated to the response.
  • Include completeness metadata in the result cache entry.
  • Update MCP instructions so agents disclose incomplete results.
  • Correct the server documentation.

Example

{
  "rowCount": 1000,
  "limit": 1000,
  "hasMore": true
}

Implementation areas

  • internal/serving/limits.go
  • internal/serving/service.go
  • internal/serving/mcp/mcp.go
  • website/src/content/docs/architecture/server.mdx

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions