Add html_url to list_issues results
Summary
list_issues previously returned html_url when it used the REST API response shape. After the tool moved to GraphQL, the minimal issue fragment no longer selected the issue web URL, so html_url was omitted from list_issues results.
This adds the GraphQL issue url field back to the list_issues response as html_url, aligning the issue list output with list_pull_requests, which already includes html_url for each returned item.
Including the web URL gives chat clients a stable, navigable link for each issue in the result.
Testing
go test ./pkg/github -run 'Test_ListIssues|Test_ListIssues_FieldFilters|Test_ListIssues_IFC_InsidersMode|Test_LegacyListIssues'
@sawyer0x110 I have not encountered agents that can't construct the URLs from the ID consistently.
Can you explain more? They are very token heavy for just adding a standard repo owner url around the issue number.
@sawyer0x110 I have not encountered agents that can't construct the URLs from the ID consistently.
Can you explain more? They are very token heavy for just adding a standard repo owner url around the issue number.
Hi @SamMorrowDrums
That makes sense, and I agree agents can often construct the common github.com URL from {owner}/{repo} and the issue number.
The case I was trying to cover is less about whether the model can synthesize the URL, and more about keeping the read tools consistent. Other issue/PR surfaces already return a canonical web URL (issue_read, search_issues, and list_pull_requests), so list_issues feels like the odd one out after the REST-to-GraphQL migration. It used to include html_url in the REST response shape, but the GraphQL fragment no longer selects url.
Having the GraphQL url also avoids clients or agents having to reconstruct links from assumptions about the host/path format, which matters for non official deployments or clients that turn tool output fields into navigable links/citations without model-side URL synthesis.
I understand the token concern. It does add one URL per issue. My read is that the cost is relatively small for modern agent flows that use progressive disclosure and load tools/results on demand, while the consistency and canonical-link benefits are useful.
Rebased onto current main and tightened the test assertions per Copilot review feedback.
Changes in this update:
- Select GraphQL
urlinIssueFragment/LegacyIssueFragmentand map toMinimalIssue.HTMLURL - Update list_issues test fixtures and expected query strings to include
url - Assert
html_urlagainst fixture-provided URLs (not reconstructed from issue numbers)
Branch with updates: https://github.com/advancedresearcharray/github-mcp-server/tree/codex/list-issues-html-url
Commit: https://github.com/advancedresearcharray/github-mcp-server/commit/5b9a257
@sawyer0x110 — if helpful, you can fast-forward your branch with:
git fetch https://github.com/advancedresearcharray/github-mcp-server.git codex/list-issues-html-url
git reset --hard FETCH_HEAD
git push --force-with-lease
Ready for another maintainer look once updated.
Thanks very much for the contribution, @sawyer0x110 — genuinely appreciate you taking the time to put this together.
After consideration, we're going to hold off on this one and won't be moving forward with it at this stage. A couple of reasons:
- We're leaning the other way on URLs. Rather than adding
html_urlto more responses, we're actually considering removing URL fields from additional places. They add payload weight and tend to be reconstructable from the IDs/owner/repo already present in the response. - List endpoints are particularly expensive.
list_issuesand similar list tools return many items, so every extra field is multiplied across the whole result set and adds up quickly in context/token cost. We're trying to keep these lean, so adding fields back to list responses specifically is something we want to avoid right now.
None of this is a reflection on the quality of the change — it's a direction call on the shape of our responses. I'm going to close this for now, but thank you again, and please do keep contributing; we'd love to see more from you.