Delete a branch
delete_branchDeletes a repository branch in write mode, refusing default and protected branches; check merged status first because commits only that branch held become unreachable.
Instructions
Delete a branch (owner/repo/branch; requires write mode). The forge refuses the default branch and protected branches. Commits only that branch held become unreachable, so check it is merged first (get_pull_request's merged).
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": {
"owner": "<owner>",
"repo": "<repo>",
"branch": "<branch>"
},
"name": "delete_branch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name. | |
| owner | Yes | Repository owner. | |
| branch | Yes | Branch to delete, e.g. `feature/login`. |