Skip to content

fix(notifications): mark subscription tools destructive#2936

Open
SamMorrowDrums wants to merge 1 commit into
mainfrom
sammorrowdrums-explicit-protocol-annotations
Open

fix(notifications): mark subscription tools destructive#2936
SamMorrowDrums wants to merge 1 commit into
mainfrom
sammorrowdrums-explicit-protocol-annotations

Conversation

@SamMorrowDrums

Copy link
Copy Markdown
Collaborator

Summary

  • explicitly mark both notification subscription management tools as destructive
  • assert the annotation in unit tests and tool snapshots
  • preserve the existing conservative client UX while making the intent independent of protocol defaults

Rationale

The MCP 2026-07-28 draft defines destructiveHint: false to mean that a tool performs only additive updates. Both tools expose a delete action that removes a subscription, and annotations apply to the whole tool rather than individual action values. They therefore need to advertise destructiveHint: true.

The protocol default remains true, so this does not change effective behavior. It makes the behavior conscious and explicit under modelcontextprotocol/go-sdk v1.7.0-pre.3, which represents this default-true field as an optional pointer.

Specification: https://modelcontextprotocol.io/specification/draft/schema#toolannotations

This supersedes #2845 and #2884, which set the hint to false.

Closes #2841

Both tools expose a delete action, so the tool-level annotation must remain
conservative even though their other actions only update preferences.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: be9c15fe-a113-4ebd-b9ab-09a520d522b6
Copilot AI review requested due to automatic review settings July 23, 2026 10:36
@SamMorrowDrums
SamMorrowDrums requested a review from a team as a code owner July 23, 2026 10:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Explicitly marks notification subscription tools as destructive because both support deletion.

Changes:

  • Sets DestructiveHint to true for both tools.
  • Adds unit assertions and updates tool snapshots.
Show a summary per file
File Description
pkg/github/notifications.go Adds explicit destructive annotations.
pkg/github/notifications_test.go Verifies annotations are present and true.
pkg/github/__toolsnaps__/manage_notification_subscription.snap Updates emitted schema snapshot.
pkg/github/__toolsnaps__/manage_repository_notification_subscription.snap Updates emitted schema snapshot.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Medium

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

2 participants