Skip to main content
Glama

update_branch_protection

Configure branch protection rules to enforce code quality standards, require reviews, and prevent unauthorized changes in GitHub repositories.

Instructions

Update branch protection rules for a branch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner
repoYesRepository name
branchYesBranch name (e.g. 'main')
required_status_checks_strictNoRequire branches to be up to date before merging
required_status_checks_contextsNoList of status check contexts required (e.g. ['ci/tests'])
enforce_adminsNoEnforce restrictions for administrators
required_approving_review_countNoNumber of required approving reviews (0-6)
dismiss_stale_reviewsNoDismiss stale pull request approvals when new commits are pushed
require_code_owner_reviewsNoRequire review from code owners
require_last_push_approvalNoRequire approval from someone other than the last pusher
required_linear_historyNoRequire linear commit history (no merge commits)
allow_force_pushesNoAllow force pushes to the protected branch
allow_deletionsNoAllow the protected branch to be deleted
block_creationsNoBlock branch creation that matches the protection pattern
required_conversation_resolutionNoRequire conversation resolution before merging
lock_branchNoLock the branch (make it read-only)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Update' implies a mutation, it doesn't specify critical details like required permissions (e.g., admin access), whether changes are reversible, potential side effects (e.g., affecting existing pull requests), or rate limits. This is inadequate for a complex mutation tool with no annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise—a single sentence that directly states the tool's purpose without any fluff or redundancy. It's front-loaded and wastes no words, making it efficient for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (16 parameters, mutation operation) and lack of annotations, the description is insufficient. It doesn't explain behavioral aspects like permissions, side effects, or error conditions. While an output schema exists (which covers return values), the description fails to provide necessary context for safe and effective use, especially for a mutation tool with no annotation support.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with all 16 parameters well-documented in the schema itself (e.g., 'owner', 'repo', 'branch', and various protection settings). The description adds no additional parameter semantics beyond what's already in the schema, so it meets the baseline of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Update') and resource ('branch protection rules for a branch'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from the sibling tool 'delete_branch_protection', which handles removal rather than modification.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing admin permissions), when not to use it, or how it relates to sibling tools like 'get_branch_protection' (for viewing) or 'delete_branch_protection' (for removal).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/software-engineer-mj/github-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server