Skip to main content
Glama

list_branches

Retrieve GitLab repository branches with commit details, default and protected status. Filter by name, paginate results, and identify branch protection at a glance.

Instructions

List repository branches with commit details, default flag, and protected status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYesPage number for pagination (default: 1)
searchNoSearch query to filter branch names (e.g. 'feature')
per_pageYesNumber of branches per page (default: 20, max: 100)
project_idYesProject numeric ID (e.g. 31) or namespace path (e.g. 'group/project-name'). URL-encoding is handled automatically.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations provided, the description carries the full behavioral burden. It helpfully discloses what each item contains (commit details, default flag, protected status), but says nothing about the read-only/safe nature, pagination behavior, or any auth requirements beyond what the schema already implies.

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?

A single front-loaded sentence with no filler; every clause carries information about scope and return content.

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 paginated list tool with no output schema, the description covers the returned fields adequately, but omits pagination behavior, result ordering, and read-only guarantees that an agent would benefit from knowing before calling.

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%, so page, per_page, search, and project_id are already documented in the schema with defaults and formats. The description adds no additional parameter meaning, so the baseline of 3 applies.

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?

States a specific verb+resource ('List repository branches') and even summarizes the returned fields (commit details, default/protected flags), so the operation is unambiguous. It does not differentiate itself from siblings like get_branch, create_branch, or delete_branch, leaving that inference to the agent.

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 only states what it lists; it gives no when-to-use context, no mention of when to prefer the single-branch get_branch, and no prerequisite/auth notes. The agent must infer usage entirely from the name.

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