Get branch protection
get_branch_protectionFetch branch protection settings—required reviews, status checks, signatures, and force-push rules—to verify repository safeguards before making changes.
Instructions
Fetch the protection settings for a branch (required reviews, status checks, signatures, force-push rules).
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": {
"org": "<org>",
"repo": "<repo>",
"branch": "<branch>"
},
"name": "get_branch_protection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org | Yes | Organization login (must be within GHE_ORG_ALLOWLIST when that is set) | |
| repo | Yes | Repository name (without the org/ prefix) | |
| branch | Yes | Branch name, e.g. main |