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
- In the MCP server wrapper for these two tools, plumb
per_page through to the underlying GitHub REST call (/actions/workflows, /labels).
- Default to a smaller page size (e.g. 10) when not specified — discoverable but not greedy.
- Expose
total_count in the response (already done for list_label per the report).
- 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 · ◷
Context
The 2026-05-21 MCP Structural Analysis (discussion #33752) found two wrappers that silently ignore the
per_pageparameter, costing tokens on every call:list_workflowsreturns all 30 workflows on one page (~3,500 tokens) even whenper_page=1is requested.list_labelreturns the first 100 of 559 labels with noper_pageparameter 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
per_pagethrough to the underlying GitHub REST call (/actions/workflows,/labels).total_countin the response (already done forlist_labelper the report).per_page=1returns exactly one item.Success criteria
list_workflowswithper_page=1returns one workflow.list_labelaccepts and respectsper_page.References