Skip to main content
Glama

list_branches

Read-onlyIdempotent

List or search branches in a CERN GitLab repository to retrieve branch names and commit metadata, so you can pick a branch and pass it as the ref argument to content and code-search tools.

Instructions

List or search branches in a CERN GitLab repository. Returns branch names and commit metadata so a branch can be selected and passed as the 'ref' argument to repository content and code-search tools.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project": "<project>"
    },
    "name": "list_branches"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoPage number to retrieve
searchNoOptional branch-name filter. GitLab supports partial matches and anchors such as '^main$' for an exact match.
projectYesProject identifier — either a numeric ID (e.g. '12345') or a namespace/project path (e.g. 'atlas/athena')
per_pageNoNumber of branches to return

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • changedInput schema / properties / project / description
      Previous value: -"Project identifier — either a numeric ID (e.g. '12345') or a URL-encoded path (e.g. 'atlas/athena')"New value: +"Project identifier — either a numeric ID (e.g. '12345') or a namespace/project path (e.g. 'atlas/athena')"
  2. Changed12 schema fields changedv0.3.0
    • addedInput schema / properties / page / default
      Added value: +1
    • changedInput schema / properties / page / description
      Previous value: -"Page number to retrieve (default: 1)"New value: +"Page number to retrieve"
    • addedInput schema / properties / page / title
      Added value: +"Page"
    • addedInput schema / properties / per_page / default
      Added value: +20
    • changedInput schema / properties / per_page / description
      Previous value: -"Number of branches to return (default: 20, max: 100)"New value: +"Number of branches to return"
    • addedInput schema / properties / per_page / title
      Added value: +"Per Page"
    • changedInput schema / properties / project / description
      Previous value: -"Project identifier — either a numeric ID (e.g. '12345') or a path (e.g. 'atlas/athena')"New value: +"Project identifier — either a numeric ID (e.g. '12345') or a URL-encoded path (e.g. 'atlas/athena')"
    • addedInput schema / properties / project / title
      Added value: +"Project"
    • addedInput schema / properties / search / default
      Added value: +""
    • addedInput schema / properties / search / title
      Added value: +"Search"
    • addedInput schema / title
      Added value: +"list_branches_fnArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "list_branches_fnDictOutput",
      +  "type": "object"
      +}
  3. Addedv0.2.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is fully covered. The description's only added behavior claim is that it returns branch names and commit metadata, which largely duplicates the existing output schema. Nothing is said about pagination behavior, default page size, or result caps despite page/per_page parameters existing.

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?

Two sentences, zero filler, with the core action front-loaded and the workflow rationale second. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter, read-only listing tool with full schema coverage, complete annotations, and an output schema, the description covers purpose and workflow placement adequately. Minor gaps: no mention of pagination discipline or sibling differentiation from list_tags.

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%, including the search filter's GitLab anchor syntax and the project identifier format, so the schema carries the parameter burden. The description adds only the indirect hint that a branch name is the value passed as 'ref'. Baseline 3 applies when the schema is this complete.

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 names a specific verb pair and resource: 'List or search branches in a CERN GitLab repository', which is instantly parseable. It does not explicitly contrast with the similar sibling list_tags, but the resource noun is distinct enough that an agent won't confuse them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear downstream context: results are meant to supply the 'ref' argument for repository content and code-search tools, which tells an agent when this tool belongs in a workflow. It lacks explicit exclusions or a named alternative (e.g. use list_tags for tags), so it falls short of a 5.

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