delete_branch
Deletes a Bitbucket branch by workspace, repository, and branch name; optionally provide expected_head SHA to skip lookup and enforce compare-and-swap.
Instructions
Delete a branch. Pass expected_head (commit SHA) to skip the lookup call (Server).
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": {
"workspace": "<workspace>",
"repository": "<repository>",
"branch_name": "<branch_name>"
},
"name": "delete_branch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | Project key (e.g., PROJ) | |
| repository | Yes | Repository slug | |
| branch_name | Yes | ||
| expected_head | No | Known head SHA (compare-and-swap) |