Delete branch
delete_branchDelete a Git branch in Azure DevOps only when it still points to the specified commit, preventing accidental removal of updated branches.
Instructions
Delete a branch only if it still points at the exact expected commit.
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": {
"repositoryId": "<repositoryId>",
"branchName": "<branchName>",
"expectedObjectId": "<expectedObjectId>",
"confirm": "<confirm>"
},
"name": "delete_branch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | Yes | Must be true to perform the mutation. | |
| project | No | ||
| branchName | Yes | ||
| repositoryId | Yes | ||
| expectedObjectId | Yes |