fix: set destructiveHint: false on notification-subscription tools - #3074
Open
juneja-varun wants to merge 1 commit into
Open
fix: set destructiveHint: false on notification-subscription tools#3074juneja-varun wants to merge 1 commit into
juneja-varun wants to merge 1 commit into
Conversation
manage_notification_subscription and manage_repository_notification_subscription emit readOnlyHint: false but omit destructiveHint. Under MCP schema 2025-06-18, an omitted destructiveHint defaults to true, so spec-conformant clients render both as destructive even though they only update the caller's own subscription state and don't modify thread or repository content. Set destructiveHint: false explicitly on both. Regenerated toolsnaps via UPDATE_TOOLSNAPS=true go test ./... Fixes github#2841
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.
Problem
manage_notification_subscriptionandmanage_repository_notification_subscriptionboth emitreadOnlyHint: falsebut omitdestructiveHint. Under MCP schema 2025-06-18, an omitteddestructiveHintdefaults totrue, so a spec-conformant client renders both as destructive — even though they only update the caller's own subscription state (watch/ignore/remove the subscription preference) and don't modify thread or repository content. This makes consent UIs over-warn on what are actually low-risk, per-user preference toggles.Fix
Set
destructiveHint: falseexplicitly on both, per #2841.Testing
go build ./...andgo test ./...(full suite, all packages) pass. Regenerated the two affected toolsnaps viaUPDATE_TOOLSNAPS=true go test ./...as instructed in CONTRIBUTING.md, and re-ranscript/generate-docs(no doc changes needed — hints aren't rendered in the generated docs).gofmtclean on the changed file.Fixes #2841