Title: update_issue_labels is annotated destructiveHint: false but replaces (removes) existing labels · Issue #3760 · github/github-mcp-server · GitHub
Open Graph Title: update_issue_labels is annotated destructiveHint: false but replaces (removes) existing labels · Issue #3760 · github/github-mcp-server
X Title: update_issue_labels is annotated destructiveHint: false but replaces (removes) existing labels · Issue #3760 · github/github-mcp-server
Description: Describe the bug The granular update_issue_labels tool sets destructiveHint: false. Its own description says "This replaces the current labels with the provided list", and that is what it does: labels not in the list are removed. A host ...
Open Graph Description: Describe the bug The granular update_issue_labels tool sets destructiveHint: false. Its own description says "This replaces the current labels with the provided list", and that is what it does: lab...
X Description: Describe the bug The granular update_issue_labels tool sets destructiveHint: false. Its own description says "This replaces the current labels with the provided list", and that is what it...
Opengraph URL: https://github.com/github/github-mcp-server/issues/3760
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"update_issue_labels is annotated destructiveHint: false but replaces (removes) existing labels","articleBody":"### Describe the bug\n\nThe granular `update_issue_labels` tool sets `destructiveHint: false`. Its own description says \"This replaces the current labels with the provided list\", and that is what it does: labels not in the list are removed. A host that keys confirmation on `destructiveHint` may not prompt for a call that removes labels.\n\nThis is the opposite of #3281 / PR #3293, which are about additive tools that *omit* the hint. Here the hint is explicitly `false` on a tool that removes data. Open PR #2742 adds `method: replace|add|remove` but keeps `replace` as the default and does not change the annotation. `update_issue_assignees` uses the same annotation and the same replace pattern (`issues_granular.go:238`). That one was not tested live.\n\nA previous PR, #2471, which marked the granular `update_issue_*` tools destructive for client egress policy, was closed unmerged. This issue is narrower: it concerns only the two replace-semantics tools, where the description and the annotation disagree.\n\nThe tool is behind the `issues_granular` feature flag, and this is an annotation-accuracy item only. To enable it, start the server with `--features=issues_granular`, which swaps the consolidated `issue_write` for the granular issue tools.\n\nCode (main 99d6d650, unchanged since v2.1.0): `pkg/github/issues_granular.go:368-375` (`update_issue_labels`, `DestructiveHint: new(false)` at `:373`).\n\n### Affected version\n\nv2.1.0 (image `sha256:f6056fc1…0f8a`, commit 4bcdcdf8) and main nightly (image `sha256:48bc16d0…338f`, revision 99d6d650), both with `--features=issues_granular`.\n\n### Steps to reproduce the behavior\n\n1. `tools/list` shows `update_issue_labels` annotations `{\"destructiveHint\":false,\"idempotentHint\":false,\"openWorldHint\":true,\"readOnlyHint\":false}`.\n2. Issue N has labels `[c, d]`.\n(123 stands for the issue/PR number.)\n3. Call:\n ```json\n {\"name\":\"update_issue_labels\",\"arguments\":{\"owner\":\"OWNER\",\"repo\":\"REPO\",\"issue_number\":123,\"labels\":[\"a\"]}}\n ```\n4. Result: success. Labels are now `[a]`: `c` and `d` were removed.\n\n### Expected vs actual behavior\n\nExpected: a tool that can remove labels is annotated `destructiveHint: true`, or omits the hint, which defaults to true.\n\nActual: `destructiveHint: false`.\n\nSuggested fix: set `DestructiveHint: new(true)` on `update_issue_labels` (and `update_issue_assignees`) while replace is possible. Annotations are static, so this holds even if PR #2742 adds non-destructive methods.\n\n### Logs\n\n```\nannotations: {\"destructiveHint\":false,\"idempotentHint\":false,\"openWorldHint\":true,\"readOnlyHint\":false,\"title\":\"Update Issue Labels\"}\nlabels before [c, d] -> update_issue_labels labels=[\"a\"] -> OK -> labels after [a] (v2.1.0 and main)\n```\n\nFound during an independent audit of v2.1.0 on a throwaway org and private test repo. Prepared with AI assistance (Claude Code); reproduced by two independent test runs before filing.\n","author":{"url":"https://github.com/rafe-walker","@type":"Person","name":"rafe-walker"},"datePublished":"2026-11-09T06:06:04Z","url":"https://github.com/github/github-mcp-server/issues/3760"}
| 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 | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:513eae1c-9f0c-2caf-37b0-eabb71476be5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4A2:2FF249:34BFC7:47FE7B:6B05D953 |
| html-safe-nonce | e79521fe942c9dd6791806fb302ce5323324fa5dbcaa252f6389508dcd24611b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEEyOjJGRjI0OTozNEJGQzc6NDdGRTdCOjZCMDVEOTUzIiwidmlzaXRvcl9pZCI6IjQ3NDYzOTY5MzkzMTc1MzMwMTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 98df8481de9c82bcbb4e09ed02c75e4b312df7cd5e140a52cb474eaf70e90bfe |
| hovercard-subject-tag | issue:6280913891 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/github/github-mcp-server/3760/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ebdd2cc29cac263442d03462c20fdf690aff1a3e0adf351f4ef114f3e17ff680/github/github-mcp-server/issues/3760 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ebdd2cc29cac263442d03462c20fdf690aff1a3e0adf351f4ef114f3e17ff680/github/github-mcp-server/issues/3760 |
| og:image:alt | Describe the bug The granular update_issue_labels tool sets destructiveHint: false. Its own description says "This replaces the current labels with the provided list", and that is what it does: lab... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rafe-walker |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7cc8361bc0396e5c33704280422dd7a38c5b91f6190589faea57461f56967249 |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ab4da203740f827015a12d36851c8de196e908bf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width