From 9de27d76b4dbf0a6ae9ff530e03875d8aac255cc Mon Sep 17 00:00:00 2001 From: Srikanth Patchava Date: Tue, 14 Jul 2026 10:54:56 -0700 Subject: [PATCH] fix: set DestructiveHint to false for notification subscription tools 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 #2841 Signed-off-by: Srikanth Patchava --- pkg/github/notifications.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkg/github/notifications.go b/pkg/github/notifications.go index 618cbdef59..c166b5f599 100644 --- a/pkg/github/notifications.go +++ b/pkg/github/notifications.go @@ -412,9 +412,10 @@ func ManageNotificationSubscription(t translations.TranslationHelperFunc) invent mcp.Tool{ 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, + Annotations: &mcp.ToolAnnotations{ + Title: t("TOOL_MANAGE_NOTIFICATION_SUBSCRIPTION_USER_TITLE", "Manage notification subscription"), + ReadOnlyHint: false, + DestructiveHint: jsonschema.Ptr(false), }, InputSchema: &jsonschema.Schema{ Type: "object", @@ -508,9 +509,10 @@ func ManageRepositoryNotificationSubscription(t translations.TranslationHelperFu mcp.Tool{ 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, + Annotations: &mcp.ToolAnnotations{ + Title: t("TOOL_MANAGE_REPOSITORY_NOTIFICATION_SUBSCRIPTION_USER_TITLE", "Manage repository notification subscription"), + ReadOnlyHint: false, + DestructiveHint: jsonschema.Ptr(false), }, InputSchema: &jsonschema.Schema{ Type: "object",