Skip to content

fix: set DestructiveHint to false for notification subscription tools#2884

Open
srpatcha wants to merge 1 commit into
github:mainfrom
srpatcha:fix/notification-tools-destructive-hint
Open

fix: set DestructiveHint to false for notification subscription tools#2884
srpatcha wants to merge 1 commit into
github:mainfrom
srpatcha:fix/notification-tools-destructive-hint

Conversation

@srpatcha

Copy link
Copy Markdown

Summary

Under MCP schema 2025-06-18, an omitted DestructiveHint defaults to true. Both manage_notification_subscription and manage_repository_notification_subscription only modify the caller's own subscription preferences — they do not modify thread or repository content — so they should be marked non-destructive.

Changes

 Annotations: &mcp.ToolAnnotations{
-    Title:        t("TOOL_MANAGE_NOTIFICATION_SUBSCRIPTION_USER_TITLE", ...),
-    ReadOnlyHint: false,
+    Title:           t("TOOL_MANAGE_NOTIFICATION_SUBSCRIPTION_USER_TITLE", ...),
+    ReadOnlyHint:    false,
+    DestructiveHint: jsonschema.Ptr(false),
 },

Same change applied to both ManageNotificationSubscription and ManageRepositoryNotificationSubscription in pkg/github/notifications.go.

This follows the existing pattern used by other non-destructive write tools like the issue tools in pkg/github/issues_granular.go.

Fixes #2841

Under MCP schema 2025-06-18, an omitted DestructiveHint defaults
to true. Both manage_notification_subscription and
manage_repository_notification_subscription only modify the
caller's own subscription preferences, not thread or repository
content, so they should be marked non-destructive.

Explicitly set DestructiveHint: false to match the existing pattern
used by other non-destructive write tools (e.g., issue tools in
issues_granular.go).

Fixes github#2841

Signed-off-by: Srikanth Patchava <srpatcha@users.noreply.github.com>
@srpatcha srpatcha requested a review from a team as a code owner July 14, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two notification-subscription tools omit destructiveHint, defaulting to destructive under MCP 2025-06-18

1 participant