Skip to main content
Glama

list_labels

Read-only

Fetch labels for a GitLab project to inspect available tags, filter by keyword, paginate results, and optionally include issue and merge request counts.

Instructions

List labels for a project. For one known resource, use the matching get tool.

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_id": "<project_id>"
    },
    "name": "list_labels"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoPage number (default 1)
searchNoKeyword to filter labels by
summaryNoIf true, return only high-signal fields (id, iid, title, state, web_url, …). Default false keeps the full GitLab JSON.
jmespathNoOptional JMESPath expression filtering the JSON result before return.
per_pageNoItems 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. Changed2 schema fields changedv2.3.22
    • changedInput schema / properties / page / description
      Previous value: -"Page number for pagination (default: 1)"New value: +"Page number (default 1)"
    • changedInput schema / properties / per_page / description
      Previous value: -"Number of items per page (max: 100, default: 20)"New value: +"Items per page (max 100, default 20)"
  2. Changed1 schema field changedv2.3.8
    • addedInput schema / properties / summary
      Added value: +{
      +  "description": "If true, return only high-signal fields (id, iid, title, state, web_url, …). Default false keeps the full GitLab JSON.",
      +  "type": "boolean"
      +}
  3. Changed1 schema field changedv2.1.66
    • addedInput schema / properties / jmespath
      Added value: +{
      +  "description": "Optional JMESPath expression filtering the JSON result before return.",
      +  "type": "string"
      +}
  4. 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"
  5. Addedv2.1.18
  6. Removedv2.1.14
  7. Addedv2.1.11
  8. Removedv2.1.10
  9. Changed2 schema fields changedv2.1.9
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / required
      Added value: +[
      +  "project_id"
      +]
  10. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered, but the description adds essentially no behavior beyond that: nothing on pagination limits, default page size, whether ancestor-group labels are included by default, or how with_counts affects payload size. The one useful nugget — that a targeted get tool exists for single-resource reads — is a routing hint rather than behavioral disclosure.

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 short sentences with the core purpose front-loaded and the alternative surfaced immediately after. Nothing is wasted or padded.

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 an eight-parameter list tool with no output schema, the description is minimal but the schema carries the parameter burden. It still leaves the agent guessing about default result shape and pagination behavior, which matters given the summary and jmespath options.

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 eight parameters (page, per_page, search, summary, jmespath, with_counts, include_ancestor_groups, project_id) are already documented in the schema. The description adds no parameter semantics of its own, so the baseline 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 and resource scoped to a project ("List labels for a project"), which is clearly distinct from the merge-request, issue, and branch siblings. It does not name the counterpart get tool explicitly, so the differentiation is directional rather than precise.

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

Usage Guidelines3/5

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

The second sentence gives one routing rule — fetch a single known label via the matching get tool rather than listing — which is genuine when-to-use guidance. However, no guidance is given on when to use the search/per_page/page parameters versus narrowing some other way, and no mention of the non-label siblings an agent might confuse this with.

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