delete_branch
Delete a branch from a GitHub repository permanently. Use this action to remove stale or merged branches and keep your repository organized.
Instructions
Delete a branch from a GitHub repository. This action is permanent and cannot be undone. Docs: https://docs.github.com/en/rest/git/refs#delete-a-reference
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 (user or organization login) | |
| branch | Yes | Name of the branch to delete (without the refs/heads/ prefix) |