Skip to main content
Glama

Get branches

gitlab_get_branches
Read-onlyIdempotent

Retrieve and list branches for a GitLab project, with optional filtering by branch name or ref and pagination for large repositories.

Instructions

Retrieve information about branches in a project.

Args: **kwargs: Additional keyword arguments to initialize the BranchModel.

Returns: Response: The response object containing a list of Branch models.

Raises: ParameterError: If the provided parameters are invalid based on the BranchModel.

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.4/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and openWorld, so the safety profile is covered elsewhere. The description adds only a generic 'Returns: list of Branch models' and a ParameterError note, saying nothing about pagination limits despite page/per_page/max_pages parameters, nor about auth or project visibility requirements.

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

Conciseness2/5

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

It is short, but most of it is auto-generated docstring scaffolding ('Args: **kwargs…', 'Raises:') that conveys no information. The one useful sentence is front-loaded correctly, but the remainder does not earn its place.

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?

A 7-parameter paginated list tool with no output schema needs the description to explain filtering and paging semantics, and it does neither. With 0% schema coverage and no return-shape detail, an agent cannot reliably invoke this beyond passing a bare project_id.

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

Parameters1/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 fails it entirely: '**kwargs: Additional keyword arguments to initialize the BranchModel' actively misdescribes an explicit, closed parameter set and explains none of ref, branch, page, per_page, max_pages, or api_parameters.

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 first line states a specific verb and resource ('Retrieve information about branches in a project'), which is enough for an agent to know what it does. However, it never distinguishes itself from the singular sibling gitlab_get_branch or from gitlab_get_protected_branches, and the trailing '**kwargs' boilerplate blurs rather than sharpens the purpose.

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 list tool versus gitlab_get_branch (single branch) or gitlab_get_protected_branches. Nothing indicates that 'branch' or 'ref' narrow the result set, so the agent gets no routing guidance at all.

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