Skip to content

list_scores_v2: meta.total reports 0 when data[] has rows #21

Description

@shawnclybor

Summary

list_scores_v2 returns meta.total: 0 (and likely item_count) even when data[] is non-empty. The raw REST endpoint reports correct counts.

Reproduction

mcp__langfuse__list_scores_v2(
    trace_id="<some-trace-id>",
    from_timestamp="2026-05-05T13:30:00Z",
    limit=20,
)

Returns:

{
  "data": [{ ... 1 score with name=1c-error-persistence ... }],
  "metadata": { "page": 1, "limit": 20, "item_count": 1, "total": 0 }
}

total: 0 despite data containing one row. Reproduced twice (2026-05-05 and 2026-05-06) against https://us.cloud.langfuse.com.

Expected

meta.total should equal the total matching score count for the filter (consistent with the raw REST endpoint GET /api/public/v2/scores, which returns correct totals for the same filter).

Workaround

Count len(data) directly — agents using this MCP for verification assertions are silently failing on meta.total == 0 checks.

Environment

  • Package: langfuse-mcp via uvx --python 3.11 langfuse-mcp --read-only
  • Langfuse instance: us.cloud.langfuse.com
  • Caller: Claude Code agent via MCP stdio

Happy to test a fix or provide more reproduction data.

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