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

オープン 初心者向け
#3,960 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
api, tooling

調査の方向性

まず、list_issues と search_issues のフィールドスキーマ、および受け入れ可能なフィールドを報告する検証エラーを特定してください。それぞれの許可リストを比較し、各ツールの既存テストを確認してください。フィールドの集合が同期した状態に保たれることを確認するチェックを追加してください。両方が html_url を含む共通フィールドを受け入れ、テストが対応するスキーマをカバーしたら完了です。

索引モデルが issue の本文から書いたものです。

説明

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"
主要言語
Go
スター
34.8k
フォーク
5.4k
平均マージ
3日 22時間
マージ済み PR(30日)
31

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/github-mcp-server のほかの issue

github/github-mcp-server の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。