list_issues and search_issues: inconsistent `fields` allow-lists (`html_url` rejected by list)

Open Beginner friendly
#3,960 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go
Domain
api, tooling

Research direction

Start by locating the list_issues and search_issues field schemas and the validation error that reports the accepted fields. Compare their allow-lists, then inspect the existing tests for each tool and add a check that their field sets stay in sync. Done when both accept the shared fields, including html_url, and the tests cover the matching schemas.

Written by the indexing model from the issue text.

Description

Describe the bug

list_issues and search_issues return the same kind of object but accept different fields allow-lists. In particular, html_url is accepted by search_issues and rejected by list_issues:

  • search_issues(fields: ["number","title","state","html_url"]) succeeds.
  • list_issues(fields: ["number","title","state","html_url"]) fails with:
    fields[3]: Expected "number" | "title" | "body" | "state" | "user" | "labels" | "assignees" | "comments" | "created_at" | "updated_at" | "field_values"

This forces callers to keep separate field lists for two tools that should be interchangeable, and it turns a simple "list or search, same projection" workflow into a retry. html_url is a standard, useful field (linking issues), so its absence from list_issues is surprising.

Steps to reproduce the behavior
  1. Call search_issues with fields: ["number","title","state","html_url"].
  2. Observe success and html_url in the results.
  3. Call list_issues with the same fields.
  4. Observe the invalid-arguments error above.
Expected vs actual behavior

Expected: both tools accept the same issue-field allow-list, including html_url, or share a single schema/type for issue projections.

Actual: the allow-lists diverge, and a field valid in one tool is invalid in the other.

Proposed solution

Define one shared issue-field schema used by list_issues, search_issues, and (with #3959) issue_read. Include at least:

number, title, state, state_reason, user.login, labels, assignees, milestone, comments, created_at, updated_at, closed_at, html_url, and opt-in body.

Return the allowed field list in validation errors, and add a test that the list/search field sets stay in sync.

Example prompts or workflows (for tools/toolsets only)
  • "List the 30 newest issues with number, title, state, and URL; then run the same query as a search." — same fields argument for both calls.
  • "Build a release-notes table with issue links from either a list or a search."
  • "Switch from search_issues to list_issues when the search rate limit is hit, without rewriting the projection."
Additional context

Related: #3605 (inconsistent parameter names), #3286 (PR response field filtering), #3959 (issue_read field filtering), #2425 (schema descriptions), #2270 (closed: projects_list ignored fields).

Environment: OpenCode 2.4.1, hosted endpoint https://api.githubcopilot.com/mcp/, toolsets repos,issues,pull_requests,actions.

Logs
list_issues fields error:
fields[3]: Expected "number" | "title" | "body" | "state" | "user" | "labels" | "assignees" | "comments" | "created_at" | "updated_at" | "field_values"
Dominant language
Go
Stars
34.8k
Forks
5.4k
Avg merge
3d 22h
Merged PRs (30d)
31

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/github-mcp-server

All issues in github/github-mcp-server

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.