Delete branch
bb_delete_branchDeletes a branch from a Bitbucket project repository and refuses the operation with a structured DELETE_REFUSED error when the target is the default branch.
Instructions
Delete a branch. Refuses with a structured DELETE_REFUSED error when the target is the repository's default branch.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectKey": "<projectKey>",
"repositorySlug": "<repositorySlug>",
"name": "<name>"
},
"name": "bb_delete_branch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Branch to delete. | |
| projectKey | Yes | Project key (on Cloud: workspace slug). | |
| repositorySlug | Yes | Repository slug. |