delete_branch
Delete a branch from a Bitbucket repository. Cannot delete the default branch. Use this for cleanup after merging pull requests or removing stale feature branches.
Instructions
Delete a branch from a Bitbucket repository. Cannot delete the default branch. Use this for cleanup after merging pull requests or removing stale feature branches.
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": {
"repository": "<repository>",
"branch": "<branch>"
},
"name": "delete_branch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | Yes | Branch name to delete (e.g., "feature/old-feature", "bugfix/resolved-issue"). | |
| project | No | Bitbucket project key. If omitted, uses BITBUCKET_DEFAULT_PROJECT environment variable. | |
| repository | Yes | Repository slug containing the branch. |