Skip to content

Order list_label results by issue count (descending) - #2974

Draft
iulia-b wants to merge 1 commit into
mainfrom
feature/list-labels-order-by-issue-count
Draft

Order list_label results by issue count (descending)#2974
iulia-b wants to merge 1 commit into
mainfrom
feature/list-labels-order-by-issue-count

Conversation

@iulia-b

@iulia-b iulia-b commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Sends orderBy: {field: ISSUE_COUNT, direction: DESC} on the GraphQL labels query so the most-used labels (by issue count) are returned first. ISSUE_COUNT is accepted by the GitHub GraphQL API but is not part of the public schema docs or the githubv4 client library's LabelOrderField constants, so it is defined locally.

Summary

Orders  list_label  results by issue count in descending order, returning the repository’s most-used labels first. Updates the tool description, tests, snapshot, and generated documentation accordingly.

Why

What changed

  • tool description
  • default order of fetching labels in list_label

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
  • New tool added

Prompts tested (tool changes only)

Security / limits

  • No security or limits impact
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Note: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Not needed
  • Updated (README / docs / examples)

Sends orderBy: {field: ISSUE_COUNT, direction: DESC} on the GraphQL
labels query so the most-used labels (by issue count) are returned
first. ISSUE_COUNT is accepted by the GitHub GraphQL API but is not
part of the public schema docs or the githubv4 client library's
LabelOrderField constants, so it is defined locally.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant