Skip to main content
Glama

list_labels

Read-only

Retrieve project labels with pagination and search. Filter by keyword, include ancestor groups, and get issue/MR counts in one read-only call.

Instructions

List labels for a project. Use this for a collection of resources; choose the corresponding get tool when you already know the single resource to inspect. It is read-only and does not mutate GitLab data; missing resources, invalid identifiers, insufficient permission, and rate limits are returned as errors. When project_id or group_id is accepted, provide the numeric ID or complete URL-encoded path described by the schema; use required identifiers and pagination fields exactly as documented.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number for pagination (default: 1)
searchNoKeyword to filter labels by
jmespathNoOptional JMESPath expression filtering the JSON result before return.
per_pageNoNumber of items per page (max: 100, default: 20)
project_idYesProject ID or URL-encoded path
with_countsNoWhether to include issue and merge request counts
include_ancestor_groupsNoInclude ancestor groups

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.66
    • addedInput schema / properties / jmespath
      Added value: +{
      +  "description": "Optional JMESPath expression filtering the JSON result before return.",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv2.1.24
    • changedInput schema / properties / with_counts / description
      Previous value: -"Whether or not to include issue and merge request counts"New value: +"Whether to include issue and merge request counts"
  3. Addedv2.1.18
  4. Removedv2.1.14
  5. Addedv2.1.11
  6. Removedv2.1.10
  7. Changed2 schema fields changedv2.1.9
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / required
      Added value: +[
      +  "project_id"
      +]
  8. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

The description adds that the tool is read-only and does not mutate GitLab data, which aligns with readOnlyHint=true. It goes beyond annotations by disclosing that missing resources, invalid identifiers, insufficient permission, and rate limits are surfaced as errors, which is useful behavioral context. No contradiction with annotations.

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?

The description is front-loaded with the purpose and usage guidance, but the third sentence mixes generic identifier advice with pagination and includes a conditional about group_id that does not apply to this schema. It is relatively concise but could be tightened by removing the irrelevant group_id clause.

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?

Given the tool is a simple read-only list with all parameters documented in schema, the description covers the key distinctions and error behavior. It doesn't describe the return format, but for a list tool that may be acceptable. The advice about projection and pagination is present, so an agent has enough to invoke it correctly.

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?

All 7 parameters already have descriptions in the schema (100% coverage), so the description's role is supplementary. It reiterates that project_id accepts a numeric ID or URL-encoded path (already in schema) and advises using pagination fields as documented, adding little new meaning beyond the schema.

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?

The description names the action ('List labels') and the resource ('for a project'), which is specific. It also distinguishes this collection-oriented tool from the get tool for single resources, differentiating it from siblings like get_label. The mention of group_id is slightly tangential because the schema only accepts project_id.

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?

It explicitly states when to use this tool ('for a collection of resources') and when to choose the alternative ('when you already know the single resource to inspect'). This is direct usage guidance versus siblings. It also instructs to use required identifiers and pagination fields as documented, reinforcing correct invocation.

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