PRO-1940: feat(mcp): add delete_branch tool - #30
Merged
Conversation
Wire a delete_branch tool to the backend archive endpoint (POST /agent/:id/branches/:branchId/archive). Guards surfaced: default and live branches cannot be deleted. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
prat11m
requested review from
abhishekmishragithub,
harshitajain165 and
maharshi-smallest
as code owners
July 24, 2026 08:28
maharshi-smallest
approved these changes
Jul 24, 2026
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
delete_branchMCP tool — the connector could create/rename/make-live/read branches but had no way to delete one, so deletion requests failed (no tool was wired to the backend).POST /agent/:id/branches/:branchId/archive(soft-delete: archives the branch, its revisions, and its open draft).Test plan
npm run build+npx tsc --noEmitpass (verified locally)delete_branchdeletes a non-live, non-default branchLinear
PRO-1940
🤖 Generated with Claude Code