Add list_org_issue_fields tool#2438
Conversation
| } | ||
|
|
||
| reqURL := fmt.Sprintf("orgs/%s/issue-fields", org) | ||
| req, err := client.NewRequest(http.MethodGet, reqURL, nil) |
There was a problem hiding this comment.
Note: Using raw client.NewRequest/client.Do here because the issue-fields API isn't yet in go-github.
There was a problem hiding this comment.
Fair. Pls link the go github issue that is tracking updating to the new rest version. It's from March or so. We should have it in mind to update this once the lib is updated
|
|
||
| - **list_org_issue_fields** - List organization issue fields | ||
| - **Required OAuth Scopes**: `read:org` | ||
| - **Accepted OAuth Scopes**: `admin:org`, `read:org`, `write:org` |
There was a problem hiding this comment.
Hm can you check pls the rest endpoint? I think repo should be there too
There was a problem hiding this comment.
Had a look and the endpoint is org-scoped so I don't think we need the repo param
| // IssueFieldOption represents an option for a single_select issue field. | ||
| type IssueFieldOption struct { | ||
| ID int64 `json:"id"` | ||
| Name string `json:"name"` |
There was a problem hiding this comment.
Please double check this with the rest schema. I think color is there too
| } | ||
|
|
||
| // IssueFieldOption represents an option for a single_select issue field. | ||
| type IssueFieldOption struct { |
There was a problem hiding this comment.
We might add multiselct
| type IssueFieldOption struct { | |
| type IssueSingleSelectFieldOption struct { |
| } | ||
|
|
||
| reqURL := fmt.Sprintf("orgs/%s/issue-fields", org) | ||
| req, err := client.NewRequest(http.MethodGet, reqURL, nil) |
There was a problem hiding this comment.
Fair. Pls link the go github issue that is tracking updating to the new rest version. It's from March or so. We should have it in mind to update this once the lib is updated
Summary
Add a new
list_org_issue_fieldsMCP tool that retrieves issue field definitions for a GitHub organization, including field names, types, and single-select options.Why
Enables AI agents to discover available custom issue fields for an organization, which is necessary for workflows that create or update issues with custom field values.
Fixes https://github.com/github/plan-track-agentic-toolkit/issues/38
What changed
issue_fields.gowithListOrgIssueFieldstool implementation, callingGET /orgs/{org}/issue-fieldsissue_fields_test.gowith unit tests covering success, 404 (empty list), and missing parameter casestools.gounder the issues toolsetlist_org_issue_fields.snapREADME.mdwith tool documentationMCP impact
list_org_issue_fields— a read-only tool that lists organization-level issue field definitions (text, number, date, single_select) and their options. Requiresread:orgscope.Prompts tested (tool changes only)
Security / limits
Requires
read:orgOAuth scope. Returns empty list on 404 (org doesn't have issue fields enabled) rather than exposing error details.Tool renaming
deprecated_tool_aliases.goLint & tests
./script/lint./script/testDocs