Delete Project Branch
openl_delete_project_branchDeletes a project branch from its repository after mandatory safety checks: confirms exact branch name, rejects base or protected branches, and requires explicit acknowledgment of potential data loss.
Instructions
Delete a branch from the repository hosting a project. The tool first reads project-aware branch metadata: a base branch is always rejected, and a protected branch requires force=true plus confirmForce=true (and eligible Studio permissions). It then performs a safe-delete preflight against the repository base branch when the target is the project's current branch. A branch with commits absent from base, unsaved changes, or no authoritative divergence check is rejected unless confirmDataLoss=true explicitly acknowledges the reported risk. confirmBranchName must exactly equal branch. If the project is open on the deleted branch, Studio closes it first. Branch names containing '/' are supported.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Bypass protected-branch restrictions for eligible managers. Default false. | |
| branch | Yes | Exact branch name from openl_list_project_branches(). The repository base branch cannot be deleted. | |
| projectId | Yes | Project ID returned by backend. Use the exact 'projectId' value from openl_list_projects() response without modification or reformatting. | |
| confirmForce | No | Must be true when force=true, confirming the protected-branch bypass. | |
| confirmDataLoss | No | Explicitly allow deletion after the tool reports that the branch has commits absent from the base branch, has unsaved working-copy changes, or its divergence from base cannot be verified (for example, the base is unknown, the merge check fails or checks different branches, or the target is not current). Omit for the initial safe-delete attempt. | |
| response_format | No | Response format: 'json' for structured, round-trippable data (default), 'markdown' for human-readable output, 'markdown_concise' for a brief summary (1-2 paragraphs), or 'markdown_detailed' for full details with context | json |
| confirmBranchName | Yes | Required safety confirmation; must exactly equal branch. |