Repository navigation
feat!: ask for confirmation before running a delete tool - #299
Closed
katayama8000 wants to merge 3 commits into
Closed
katayama8000 wants to merge 3 commits into
katayama8000 wants to merge 3 commits into
Conversation
Built on inputRequired so one handler serves both protocol eras: the SDK's legacy shim turns it into elicitation/create on 2025-era connections. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Updates stay in Backlog's change history and a removed relation can be re-added, but deleted records cannot be restored. A client without elicitation support can no longer run delete_* tools. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Closing: not pursuing server-side confirmation for now. Over stateless HTTP, 2025-era clients cannot be asked, and the confirmation is not yet bound to the arguments the user saw. Hosts already confirm destructive tools from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Before a
delete_*tool (delete_issue,delete_version,delete_watching) runs, the server now asks the user to confirm through MCP elicitation. The prompt shows the tool name and its arguments. If the user declines, cancels, or accepts withconfirm: false, nothing is deleted and the tool returns an error result.Only
deleteis covered: updates stay in Backlog's change history andremove_related_issuecan be re-added, but a deleted record cannot be restored.Breaking change
A client that does not declare elicitation support can no longer run
delete_*tools. The call fails with the SDK's capability error instead of deleting.Implementation
withConfirmationreturnsinputRequired(...), so one handler serves both protocol eras. On 2026-07-28 the client fulfils the request. On 2025-era connections the SDK's legacy shim sendselicitation/createand re-enters the handler with the answer.requiresConfirmation(name)sits next totoolAnnotationsForand keys off the bare tool name, so--prefixdoes not affect it.composeToolHandlerdirectly do not get the confirmation. It is applied inregisterTools.Compared with other servers
delete_repository, by making the user typeowner/repo. It also hides the tool from clients without elicitation, and binds the confirmation to the target and a TTL through request state.Not in this PR
requestState, as GitHub does).Testing
withConfirmation.test.ts,requiresConfirmationintoolAnnotations.test.ts, and the registration inregisterTools.test.ts.delete_issuesendselicitation/create, and declining returns an error without calling Backlog.add_issuegoes straight to the API.🤖 Generated with Claude Code