Skip to main content
Glama

list_labels

Read-only

Retrieve labels for a GitLab project to filter issues and merge requests, with options for keyword search, pagination, and ancestor group labels.

Instructions

List labels for a project. For one known resource, use the matching get tool. Read-only; missing resources, denied access, and rate limits return errors. project_id/group_id take a numeric ID or URL-encoded path.

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

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, but the description adds genuinely new behavioral context: missing resources, denied access, and rate limits all return errors. That error-profile disclosure goes beyond the structured annotations and is useful for an agent.

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?

Three sentences with the core purpose front-loaded, followed by the alternative and error semantics. Tight overall, with only the redundant ID-format sentence detracting slightly.

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 read-only list tool with full schema coverage and no output schema, the description covers purpose, the list-vs-single-resource choice, and error behavior. Pagination and filtering details are left to the schema, which documents them, so nothing critical is missing.

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 the schema already documents all seven parameters. The description's note that project_id/group_id take a numeric ID or URL-encoded path merely repeats the schema's own wording, and it even mentions group_id, which is not a parameter here.

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 ('List labels for a project'), which is unambiguous. It does not differentiate from an actual sibling because no label-listing sibling exists, and the referenced 'matching get tool' is generic rather than named, so it falls short of a 5.

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?

Provides a clear alternative direction: for a single known resource, use the matching get tool rather than this list tool. However, it does not name a concrete sibling (no get_label appears in the sibling list), so the routing is clear in spirit but not fully actionable.

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