Repository navigation
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Dropping required issue properties while changing serialization across legacy and structured MCP responses creates interacting compatibility risks for downstream consumers that warrant maintainer review.
No open issues 🎉
What changed in this PR
Adds optional field selection to issue_read with method: get, addressing the get portion of #3959. Agents can request issue metadata without including long bodies, while omitted or empty selections preserve full responses.
Changes:
- Validates top-level field selections and filters both legacy text and structured responses.
- Updates the output schema to allow partial issue objects.
- Adds response-format tests and documents metadata-only usage.
| File | Description |
|---|---|
| README.md | Documents the optional fields parameter. |
| pkg/skills/catalog/skills/issue-backlog-triage/SKILL.md | Adds a metadata-only issue-read example. |
| pkg/github/typed_consolidated_issue_outputs_test.go | Tests selections, defaults, invalid requests, and partial output schemas. |
| pkg/github/issues.go | Advertises selectable fields and applies filtering for get. |
| pkg/github/issue_tool_types.go | Adds Fields to the issue-read input type. |
| pkg/github/consolidated_issue_types.go | Filters structured issue output and permits partial objects. |
| pkg/github/__toolsnaps__/issue_read.snap | Updates the input and output schema snapshot. |
Review effort: Balanced (adaptive)
| Type: "number", | ||
| Description: "The number of the issue", | ||
| }, | ||
| "fields": fieldsSchemaProperty( |
There was a problem hiding this comment.
I pushed an implementation of this approach to my fork: feat/issue-read-fields, commit f9009b0. It adds a separate get_fields method, reuses the existing getIssue implementation, and preserves get's full response contract and output schema. It also includes focused tests and the related toolsnap/docs updates. Could this approach address the contract concern?
There was a problem hiding this comment.
Thanks for putting together a working patch. I compared the schemas and confirmed that get still requires the same four fields. Splitting field selection into get_fields addresses the compatibility concern for existing get calls. If maintainers are comfortable adding the method, I’d be happy to bring your commit into this PR and rerun the full suite.
Summary
Add optional
fieldsselection toissue_readwithmethod: get. An agent can retrieve issue metadata without bringing a long issue body into context.Why
Agents that build triage tables and release summaries often need only a few issue fields.
list_issuesandsearch_issuesalready let callers select fields. This PR addresses thegetportion of #3959.What changed
fieldsis omitted or empty.MCP impact
issue_readaccepts an optionalfieldsarray forget, and theissueobject can contain a subset of its properties.Prompts tested
Security / limits
Tool renaming
Lint & tests
golangci-lint v2.14.0 runscript/test(go test -race ./...) with built UI assetsDocs
Skills
AI assistance was used to implement, review, and test the change.