Skip to main content
Glama

get_branch_protection

Retrieve branch protection rules to enforce security policies and prevent unauthorized changes in GitHub repositories.

Instructions

Get branch protection rules for a branch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner
repoYesRepository name
branchYesBranch name (e.g. 'main')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It states the action ('Get') but doesn't describe the tool's behavior—such as what permissions are required, whether it's idempotent, how errors are handled, or the format of the returned protection rules. For a read operation with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves in practice.

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 redundant information. It's front-loaded and wastes no words, making it easy to parse quickly. Every part of the sentence earns its place by clearly communicating the core functionality.

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 the tool's moderate complexity (a read operation with three required parameters), the description is minimally complete. The presence of an output schema means the description doesn't need to explain return values, but it lacks context on authentication, error handling, or usage scenarios. With no annotations and a basic description, it meets the minimum threshold but leaves the agent to rely heavily on the structured fields for full understanding.

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 description adds no parameter-specific information beyond what's already in the input schema, which has 100% coverage with clear descriptions for 'owner', 'repo', and 'branch'. Since the schema fully documents the parameters, the baseline score of 3 is appropriate—the description doesn't compensate but also doesn't need to, as the schema provides adequate semantics.

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 tool's purpose with a specific verb ('Get') and resource ('branch protection rules for a branch'), making it immediately understandable. It distinguishes from siblings like 'update_branch_protection' and 'delete_branch_protection' by focusing on retrieval rather than modification. However, it doesn't explicitly differentiate from other read operations like 'list_branches' beyond the specific resource type.

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., authentication requirements), when not to use it, or how it differs from related tools like 'list_branches' or 'get_repository' that might provide overlapping information. The agent must infer usage solely from the tool name and parameters.

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