Skip to content

[deep-report] Add per_page pagination support to MCP list_workflows and list_label wrappers #33793

@github-actions

Description

@github-actions

Context

The 2026-05-21 MCP Structural Analysis (discussion #33752) found two wrappers that silently ignore the per_page parameter, costing tokens on every call:

  • list_workflows returns all 30 workflows on one page (~3,500 tokens) even when per_page=1 is requested.
  • list_label returns the first 100 of 559 labels with no per_page parameter at all — so agents asking for a single label still pay for 100.

The context surcharge multiplies across every agent that uses these tools.

Quick-win task

  1. In the MCP server wrapper for these two tools, plumb per_page through to the underlying GitHub REST call (/actions/workflows, /labels).
  2. Default to a smaller page size (e.g. 10) when not specified — discoverable but not greedy.
  3. Expose total_count in the response (already done for list_label per the report).
  4. Add a regression test that confirms per_page=1 returns exactly one item.

Success criteria

  • list_workflows with per_page=1 returns one workflow.
  • list_label accepts and respects per_page.
  • Average token cost per call drops measurably.

References

Generated by 🔬 DeepReport - Intelligence Gathering Agent · ● 17.9M ·

  • expires on May 23, 2026, 4:03 PM UTC

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions