Title: fix: mark the granular label/assignee replace tools as destructive by shhhhhhjokerist · Pull Request #3791 · github/github-mcp-server · GitHub
Open Graph Title: fix: mark the granular label/assignee replace tools as destructive by shhhhhhjokerist · Pull Request #3791 · github/github-mcp-server
X Title: fix: mark the granular label/assignee replace tools as destructive by shhhhhhjokerist · Pull Request #3791 · github/github-mcp-server
Description: Summary Mark the granular update_issue_labels and update_issue_assignees tools as destructive: both replace the current list, so entries that are not in the new list are removed. Why Fixes #3760. mcp.ToolAnnotations is what a host keys its confirmation prompt off. Both tools set DestructiveHint: false while their descriptions say "replaces the current labels/assignees with the provided list", so a host can run a call that removes labels or assignees without confirming. update_issue_labels is behind the issues_granular feature flag (--features=issues_granular), which swaps the consolidated issue_write for these granular tools. What changed pkg/github/issues_granular.go: DestructiveHint: new(true) on GranularUpdateIssueLabels and GranularUpdateIssueAssignees, with a one-line comment recording why replace semantics are destructive. pkg/github/__toolsnaps__/update_issue_labels.snap, pkg/github/__toolsnaps__/update_issue_assignees.snap: destructiveHint updated in the stored tool schemas. pkg/github/granular_tools_test.go: TestGranularReplaceToolsAreDestructive asserts the hint is explicitly true for both tools and that the description still documents the replace semantics, so a later change to additive methods cannot silently drop the hint. MCP impact Tool schema or behavior changed Only the annotations.destructiveHint value of the two granular tools changes, from false to true. Inputs, outputs and the API calls are unchanged. Prompts tested (tool changes only) "Add the label needs-triage to issue 123" → update_issue_labels now advertises destructiveHint: true, so a host that prompts for destructive calls asks before the label list is replaced. "Assign issue 123 to @octocat only" → update_issue_assignees likewise prompts before other assignees are removed. Security / limits No security or limits impact Only the annotation changes; callers keep the same permissions and the same replace behaviour. Tool renaming I am not renaming tools as part of this PR Lint & tests Linted locally with golangci-lint run ./pkg/github/... → 0 issues (go vet ./pkg/github clean) go test ./pkg/github -run 'TestGranularReplaceToolsAreDestructive|TestGranularToolSnaps|TestGranularUpdateIssueLabels|TestGranularUpdateIssueAssignees|TestIssuesGranularToolset' passes; the new test fails on the base revision Full ./script/test on this Windows checkout: the same 15 tests fail on main without this change (CRLF/base64 icon snapshots and the protocol=2026-07-28 typed wire tests), so the snapshot comparison cannot be reproduced locally here. Docs Not needed Note for reviewers: PR #2742 touches the same tool and keeps replace as the default while adding method options, so this only changes the annotation lines and is safe to rebase over that work.
Open Graph Description: Summary Mark the granular update_issue_labels and update_issue_assignees tools as destructive: both replace the current list, so entries that are not in the new list are removed. Why Fixes #3760. m...
X Description: Summary Mark the granular update_issue_labels and update_issue_assignees tools as destructive: both replace the current list, so entries that are not in the new list are removed. Why Fixes #3760. m...
Opengraph URL: https://github.com/github/github-mcp-server/pull/3791
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:0df9fa14-5ca3-8a63-1271-09cf56108c8d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 86DC:38FFFD:6CF157:949FCB:6B05E729 |
| html-safe-nonce | d01bbc04ff46c21ce6a8c97b18f4714e951bb7369a460c16e5eab2cfa81c3918 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NkRDOjM4RkZGRDo2Q0YxNTc6OTQ5RkNCOjZCMDVFNzI5IiwidmlzaXRvcl9pZCI6IjMxMDAyNTIzNjgzNzQ0NTgxNTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 03de1d6f6050c407da79a9dbc1381eabd4c4541923e7ce549435282d8e783755 |
| hovercard-subject-tag | pull_request:5235238396 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/github/github-mcp-server/pull/3791/files |
| twitter:image | https://avatars.githubusercontent.com/u/104197119?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/104197119?s=400&v=4 |
| og:image:alt | Summary Mark the granular update_issue_labels and update_issue_assignees tools as destructive: both replace the current list, so entries that are not in the new list are removed. Why Fixes #3760. m... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9e6b0e6e5a9a8e0ddb968297ede4e2eac72d30ea174a0970eb8f22d6958e91e3 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 942771284 |
| octolytics-dimension-repository_nwo | github/github-mcp-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 942771284 |
| octolytics-dimension-repository_network_root_nwo | github/github-mcp-server |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 023691d14ad20c90d3ee61b0a0977b17dc6b6361 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width