Add is_suggestion + rationale to update_issue_assignees#2821
Open
kelsey-myers wants to merge 2 commits into
Open
Add is_suggestion + rationale to update_issue_assignees#2821kelsey-myers wants to merge 2 commits into
kelsey-myers wants to merge 2 commits into
Conversation
This comment was marked as spam.
This comment was marked as spam.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the issues_granular feature-flagged MCP tool update_issue_assignees to support an “intent” object form per assignee (including is_suggestion, rationale, and confidence), bringing it in line with the object-form patterns already used by other granular issue update tools.
Changes:
- Replaces the previous
issueUpdateToolwrapper forupdate_issue_assigneeswith a custom handler that acceptsassigneesitems asstring | { login, rationale?, confidence?, is_suggestion? }. - Adds request-shaping logic to preserve the legacy wire format when no intent fields are used, and switches to an object-form PATCH body when intent fields are present.
- Updates the tool snapshot and adds unit tests for object-form serialization and validation errors.
Show a summary per file
| File | Description |
|---|---|
| pkg/github/issues_granular.go | Reworks update_issue_assignees schema + handler to support per-assignee intent fields and object-form requests. |
| pkg/github/granular_tools_test.go | Adds tests for the new object-form behavior and validation paths. |
| pkg/github/toolsnaps/update_issue_assignees.snap | Updates the snapshot to reflect the new assignees oneOf schema. |
| docs/feature-flags.md | Regenerates feature-flag tool parameter docs for update_issue_assignees. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Low
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
is_suggestion+rationale(andconfidence) params to the granularupdate_issue_assigneesMCP tool, so agents can propose assignees as pending suggestions rather than applying them directly.Why
Closes https://github.com/github/plan-track-agentic-toolkit/issues/333
The other granular tools (
update_issue_type,update_issue_labels,set_issue_fields) already support intent params behind theissues_granularfeature flag.update_issue_assigneeswas the last granular tool still on the plain string-array form. This brings it to parity, following the same implementation pattern as the labels tool in #2557.What changed
GranularUpdateIssueAssigneesfrom the simpleissueUpdateToolwrapper to the object-form pattern:assigneesitems are nowoneOf: [string, object], where the object is{ login (required), rationale (≤280 chars), confidence (low/medium/high), is_suggestion }.IssueRequest{Assignees:}(no intent) or an object-form body ({ login, rationale, confidence, suggest }) via a raw PATCH — mirroringupdate_issue_labels.assigneeWithIntentandassigneesUpdateRequeststructs.docs/feature-flags.md.MCP impact
update_issue_assigneesnow accepts an object form per assignee withrationale/confidence/is_suggestion. The plain string-array form is unchanged and still serializes identically, so it's backwards compatible.Prompts tested (tool changes only)
Tested locally against dotcom via a local build (
bin/github-mcp-server-local,--features issues_granular):confidence must be one of: low, medium, high.123) → tool erroreach assignee must be a string or an object….assigneesarray → clean no-op.is_suggestion: true→ dotcom 422 surfaced as a clean tool error.Security / limits
repo) and endpoint as before; only the request-body shape gained optional intent fields. Rationale is capped at 280 chars.Tool renaming
Lint & tests
./script/lint./script/testDocs
script/generate-docs.