Skip to main content
Glama

github_protect_branch

Set branch protection rules to enforce pull request reviews and admin policies, ensuring code quality and preventing unauthorized changes to critical branches.

Instructions

Set branch protection rules.

Args: owner: Repository owner repo: Repository name branch: Branch name to protect require_reviews: Require pull request reviews (default: True) required_reviewers: Minimum number of reviewers (default: 1) enforce_admins: Enforce rules for admins too (default: False) session_name: GitHub session to use

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYes
ownerYes
branchYes
session_nameNodefault
enforce_adminsNo
require_reviewsNo
required_reviewersNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations, the description carries the full burden for disclosing behavioral traits. It does not state whether existing protection rules are overwritten, whether admin privileges are required, or any side effects beyond setting the rules. The parameter 'enforce_admins' hints at a nuance, but overall the mutation behavior is under-described.

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

Conciseness4/5

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

The description is appropriately sized: a clear one-sentence purpose followed by a structured parameter list. It front-loads the core action and then enumerates arguments without unnecessary fluff, though the parameter list largely mirrors the schema and could be trimmed if schema descriptions were present.

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

Completeness3/5

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

Given there is an output schema, return values are likely handled elsewhere. However, the description lacks context about important behaviors: whether this modifies or replaces existing branch protection, if there are restrictions on the repository (e.g., private vs public), or what a successful invocation returns. For a mutation tool with no annotations, this is a moderate gap.

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

Parameters4/5

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

Although schema property descriptions are absent (0% coverage), the description compensates well by listing each parameter with a concise explanation: 'Require pull request reviews', 'Minimum number of reviewers', 'Enforce rules for admins too'. This adds meaning beyond the schema titles and defaults, though a few nuances (e.g., interplay between require_reviews and required_reviewers) are left implicit.

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

Purpose5/5

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

The description opens with a clear verb+resource: 'Set branch protection rules.' This is specific and immediately distinguishes it from sibling tools like github_get_branch or github_update_repo, and there is no other branch protection tool among siblings.

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?

No guidance is given on when to use this tool versus alternatives, nor are any exclusions or prerequisites mentioned. The context of enabling branch protection is implied, but the description provides no explicit decision support.

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/Pawangunjkar/github-mcp'

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