diff --git a/pkg/github/__toolsnaps__/manage_notification_subscription.snap b/pkg/github/__toolsnaps__/manage_notification_subscription.snap index 603099200..c3b3e1bd8 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 1bd09afd1..beff28bea 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 618cbdef5..c296d1bc9 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", diff --git a/pkg/github/notifications_test.go b/pkg/github/notifications_test.go index 0262ab838..9aaa880e3 100644 --- a/pkg/github/notifications_test.go +++ b/pkg/github/notifications_test.go @@ -146,6 +146,9 @@ func Test_ManageNotificationSubscription(t *testing.T) { assert.Equal(t, "manage_notification_subscription", tool.Name) assert.NotEmpty(t, tool.Description) + require.NotNil(t, tool.Annotations) + require.NotNil(t, tool.Annotations.DestructiveHint) + assert.False(t, *tool.Annotations.DestructiveHint) schema, ok := tool.InputSchema.(*jsonschema.Schema) require.True(t, ok, "InputSchema should be *jsonschema.Schema") @@ -282,6 +285,9 @@ func Test_ManageRepositoryNotificationSubscription(t *testing.T) { assert.Equal(t, "manage_repository_notification_subscription", tool.Name) assert.NotEmpty(t, tool.Description) + require.NotNil(t, tool.Annotations) + require.NotNil(t, tool.Annotations.DestructiveHint) + assert.False(t, *tool.Annotations.DestructiveHint) schema, ok := tool.InputSchema.(*jsonschema.Schema) require.True(t, ok, "InputSchema should be *jsonschema.Schema")