Skip to main content
Glama

List protected branches

gitlab_list_protected_branches
Read-only

List branch protection rules to see who can push or merge for a given GitLab project.

Instructions

Protection rules for branches (who may push/merge).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (default 1)
limitNoCap for all_pages (default 500)
per_pageNoItems per page, max 100 (default 20)
all_pagesNoFollow pagination and return up to `limit` items across pages
project_idNoProject id or URL-encoded path, e.g. `42` or `group/subgroup/project`. Falls back to GITLAB_PROJECT_ID.
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is known. The description adds a small behavioral detail—that the protection rules specify who may push/merge—which gives some context about the returned data. However, it does not disclose pagination behavior, authentication requirements, or what happens if no branches are protected. The added value beyond annotations is minimal, so a mid-range score is appropriate.

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 a single, short sentence with no filler or redundancy. It is front-loaded with the key noun phrase 'Protection rules for branches'. However, it is almost too terse—the phrase 'Protection rules for branches' reads more like a definition than a description of what the tool does, slightly reducing its effectiveness. Still, it earns a good conciseness score for its economy.

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?

For a simple read-only list tool, the description conveys the core concept (branch protection rules and their push/merge permissions). It has no output schema, so the description should at least clarify the expected return value, which it partially does. However, it does not state that the tool returns a list, nor does it mention pagination behavior beyond what the schema parameters imply. This leaves some ambiguity about the operation, making it minimally viable but not fully complete.

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?

Schema description coverage is 100%, with each of the five parameters (page, limit, per_page, all_pages, project_id) having clear descriptions. The tool description adds no additional parameter-level details, which is acceptable given the schema already sufficiently documents the parameters. The baseline of 3 applies because the schema carries the heavy lifting.

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 'Protection rules for branches (who may push/merge)' clearly identifies the resource (branch protection rules) and the key detail of what those rules govern (push/merge permissions). It is specific enough to distinguish from sibling tools like gitlab_list_branches (which lists branches themselves) and gitlab_branch_action (which performs branch operations). However, it does not explicitly state the action 'list' or 'retrieve', relying on the title for that, and does not directly differentiate itself from sibling tools.

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 does not mention any context such as 'use this to view branch protection settings' or exclude cases like 'for regular branches, use list_branches'. The only usage hint is implicit in the resource name, which is insufficient.

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/amalychev/gitlab-mcp'

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