Skip to main content
Glama

Get protected branches

gitlab_get_protected_branches
Read-onlyIdempotent

Retrieve protected branch information for a GitLab project by providing the project ID, including branch names and related protection settings.

Instructions

Get information about protected branches in a project.

Args: **kwargs: Additional parameters for the request (e.g., project_id).

Returns: Response: A wrapper containing the original response and a list of Branch models.

Raises: MissingParameterError: If the project_id is missing. ParameterError: If invalid parameters are provided.

Input Schema

NameRequiredDescriptionDefault
refNo
pageNo
branchNo
per_pageNo
max_pagesNo
project_idYes
api_parametersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv27.3.13

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description does add genuinely useful context the annotations lack: the return value is a wrapper containing the original response and a list of Branch models, plus the two specific exception types raised. However, the 'Args: **kwargs' section is misleading since the schema exposes discrete named parameters, not an open kwargs bag.

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

Conciseness3/5

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

The prose is short and front-loaded with the purpose, which is good. But the docstring-style Args/Returns/Raises scaffolding is boilerplate, and the 'Args: **kwargs ... (e.g., project_id)' block is both wasteful and inaccurate against the real schema.

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 7-parameter paginated list tool with no output schema, the Returns clause is a real asset and the error documentation is helpful. The missing piece is any explanation of the optional filtering/pagination parameters, which is the main thing an agent needs to call this correctly.

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

Parameters2/5

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

Schema description coverage is 0% across 7 parameters, so the description carries the full burden and largely fails it: it only implies project_id (via the MissingParameterError note) and never explains ref, branch, page, per_page, max_pages, or api_parameters. An agent must inspect the raw schema and guess at pagination and filtering 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 states a specific verb and resource: 'Get information about protected branches in a project.' An agent knows this is a read operation against protected branches, but the description never distinguishes it from the sibling gitlab_get_protected_branch (singular) — it doesn't say this returns a paginated list of all protection rules, leaving the two ambiguous.

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?

There is no statement of when to use this tool versus gitlab_get_protected_branch, gitlab_protect_branch, or gitlab_unprotect_branch. The only usage-adjacent content is an error note that project_id is required, which is a precondition, not selection guidance.

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

Deploy Server

Other Tools