Add list_issue_fields tool#2445
Draft
kelsey-myers wants to merge 12 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new read-only MCP tool to list organization-level issue field definitions (including single-select options) so agents can discover valid custom fields before creating/updating issues.
Changes:
- Implemented
list_org_issue_fieldstool callingGET /orgs/{org}/issue-fields, with 404 returning an empty list. - Added unit tests covering success and common error scenarios.
- Registered the tool, added a toolsnap, and updated README tool docs.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents the new list_org_issue_fields tool and required scopes. |
| pkg/github/tools.go | Registers the new tool in the issues toolset. |
| pkg/github/issue_fields.go | Implements the tool and response types for org issue fields/options. |
| pkg/github/issue_fields_test.go | Adds unit tests for the new tool behavior. |
| pkg/github/toolsnaps/list_org_issue_fields.snap | Captures the tool schema snapshot for regression checking. |
Copilot's findings
- Files reviewed: 5/5 changed files
- Comments generated: 2
15 tasks
Contributor
Author
|
Returns: |
kerobbi
previously approved these changes
May 13, 2026
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
list_issue_fieldstool that returns field definitions (name, type, options) for a GitHub org or repo. Picks up where #2438 left off, with some direction changes since.Why
Agents need to discover available custom fields before they can set field values on issues. Without this, they're guessing field names and types.
Fixes https://github.com/github/plan-track-agentic-toolkit/issues/38
What changed
list_issue_fieldstool — queriesrepository.issueFieldsororganization.issueFieldsvia GraphQL depending on whetherrepois passedrepois optional: passing owner+repo returns fields inherited from the org; passing owner alone returns org-level fields directlyrepoorread:org(either suffices, matchinglist_issue_typesapproach)WithGraphQLFeatures(ctx, "issue_fields")so the query hits the feature-flagged field on the monolithMCP impact
list_issue_fields— read-only tool returning field definitions (id, name, data_type, visibility, options for single_select). Requiresrepoorread:orgscope.Prompts tested
Security / limits
repoorread:orgrequired. User-owned repos return[](no error) — monolith returns null for non-org owners, which resolves to an empty list naturally.Tool renaming
Note: the original PR used
list_org_issue_fields— renamed tolist_issue_fieldssince it now covers both repo and org.Lint & tests
Docs