From d8dc6745d05ed54aa50cb8ecb69cbc88af49a636 Mon Sep 17 00:00:00 2001 From: varun Date: Sat, 15 Aug 2026 02:05:08 +0530 Subject: [PATCH] fix: set destructiveHint: false on notification-subscription tools 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 #2841 --- .../manage_notification_subscription.snap | 1 + .../manage_repository_notification_subscription.snap | 1 + pkg/github/notifications.go | 10 ++++++---- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkg/github/__toolsnaps__/manage_notification_subscription.snap b/pkg/github/__toolsnaps__/manage_notification_subscription.snap index 603099200a..c3b3e1bd81 100644 --- a/pkg/github/__toolsnaps__/manage_notification_subscription.snap +++ b/pkg/github/__toolsnaps__/manage_notification_subscription.snap @@ -1,5 +1,6 @@ { "annotations": { + "destructiveHint": false, "idempotentHint": false, "readOnlyHint": false, "title": "Manage notification subscription" diff --git a/pkg/github/__toolsnaps__/manage_repository_notification_subscription.snap b/pkg/github/__toolsnaps__/manage_repository_notification_subscription.snap index 1bd09afd14..beff28bea9 100644 --- a/pkg/github/__toolsnaps__/manage_repository_notification_subscription.snap +++ b/pkg/github/__toolsnaps__/manage_repository_notification_subscription.snap @@ -1,5 +1,6 @@ { "annotations": { + "destructiveHint": false, "idempotentHint": false, "readOnlyHint": false, "title": "Manage repository notification subscription" diff --git a/pkg/github/notifications.go b/pkg/github/notifications.go index 618cbdef59..c296d1bc93 100644 --- a/pkg/github/notifications.go +++ b/pkg/github/notifications.go @@ -413,8 +413,9 @@ func ManageNotificationSubscription(t translations.TranslationHelperFunc) invent Name: "manage_notification_subscription", Description: t("TOOL_MANAGE_NOTIFICATION_SUBSCRIPTION_DESCRIPTION", "Manage a notification subscription: ignore, watch, or delete a notification thread subscription."), Annotations: &mcp.ToolAnnotations{ - Title: t("TOOL_MANAGE_NOTIFICATION_SUBSCRIPTION_USER_TITLE", "Manage notification subscription"), - ReadOnlyHint: false, + Title: t("TOOL_MANAGE_NOTIFICATION_SUBSCRIPTION_USER_TITLE", "Manage notification subscription"), + ReadOnlyHint: false, + DestructiveHint: jsonschema.Ptr(false), }, InputSchema: &jsonschema.Schema{ Type: "object", @@ -509,8 +510,9 @@ func ManageRepositoryNotificationSubscription(t translations.TranslationHelperFu Name: "manage_repository_notification_subscription", Description: t("TOOL_MANAGE_REPOSITORY_NOTIFICATION_SUBSCRIPTION_DESCRIPTION", "Manage a repository notification subscription: ignore, watch, or delete repository notifications subscription for the provided repository."), Annotations: &mcp.ToolAnnotations{ - Title: t("TOOL_MANAGE_REPOSITORY_NOTIFICATION_SUBSCRIPTION_USER_TITLE", "Manage repository notification subscription"), - ReadOnlyHint: false, + Title: t("TOOL_MANAGE_REPOSITORY_NOTIFICATION_SUBSCRIPTION_USER_TITLE", "Manage repository notification subscription"), + ReadOnlyHint: false, + DestructiveHint: jsonschema.Ptr(false), }, InputSchema: &jsonschema.Schema{ Type: "object",