Skip to main content
Glama
igordev96
by igordev96

List branches and tags

list_refs
Read-only

List branch and tag names in a GitLab repository without cloning it. Filter by substring and set a result limit using cached read-only data.

Instructions

List branch and/or tag names in a repository, without cloning it into a working tree. Each row is kind, short commit, name, and the tip commit's subject. The list reflects the local copy as of synced_at (by default at most 10 minutes old); a ref created since that moment may be missing, because a stale list cannot be detected. Use resolve_ref to check one specific ref, which does refresh on a miss. If the copy cannot be refreshed, the cached copy answers and the result says the refresh failed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNoWhich refs to list: 'branches' (default), 'tags', or 'all'.
searchNoCase-insensitive substring filter on the ref name, e.g. 'PROJ' or 'fix/'.
projectNoGitLab project path, e.g. 'group/subgroup/repo'. Defaults to GITLAB_DEFAULT_PROJECT.
max_refsNoMaximum refs to return (default 200).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint/openWorldHint; the description adds substantial non-obvious behavior: results reflect a local copy as of `synced_at` (default ≤10 min old), newly created refs may be missing, staleness is undetectable, and on refresh failure the cached copy answers and the result flags the failure. That is exactly the kind of operational context structured fields cannot carry.

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?

Front-loaded with purpose and output shape, then caveats in decreasing priority. Dense but almost every clause carries real information; the staleness/failure explanation is slightly verbose but justified given no output schema.

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

Completeness5/5

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

With no output schema, the description compensates by specifying the returned row fields (kind, short commit, name, tip subject) and the freshness/failure semantics. An agent has everything needed to call it and interpret results.

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 all four parameters (kind, search, project, max_refs) are already documented in the schema. The description adds no syntax or default detail beyond it, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('List branch and/or tag names in a repository') plus the defining scope qualifier 'without cloning it into a working tree', which distinguishes it from file/tree siblings like list_tree and get_file. It even describes the row shape, so an agent knows exactly what comes back.

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

Usage Guidelines5/5

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

Explicitly routes the agent to the sibling alternative: 'Use `resolve_ref` to check one specific ref, which does refresh on a miss.' This gives a clear when-to-prefer-the-other-tool condition rather than leaving the choice to inference.

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