feat(mcp): require confirm_name for delete_workspace and send X-Confirm-Name header #7
Reference in New Issue
Block a user
Delete Branch "feat/delete-workspace-confirm-name-mcp58"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes molecule-mcp-server#58.
The tenant's destructive-action gate refuses workspace deletion unless the caller echoes the workspace's exact name in the
X-Confirm-Nameheader. The previousdelete_workspacetool only sent?confirm=true, so agents could not complete deletion even after human approval.Changes
apiCallnow accepts an optionalheadersmap.handleDeleteWorkspacerequiresconfirm_nameand sends it asX-Confirm-Name, while preserving?confirm=true.deprovision_workspaceas an alias fordelete_workspace(both names are used in the issue).CLAUDE.md, and tests updated; refusal and alias are tested.Test plan
npm testpasses (153 passed, 1 skipped).npm run buildpasses.SOP Checklist
confirmboolean was already insufficient and is replaced by the explicit name check.🤖 Generated with Claude Code
SOP checklist is now complete in the PR body and CI is green. Awaiting a peer review and
/sop-ackso this can land. Thanks!0b9834062bto5f749bd5845f749bd584to7426a8ec8eView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.