Skip to main content
Glama

get_label

Read-only

Retrieve a single GitLab project label by ID or title, optionally including ancestor groups. Read-only operation returns label details or errors for missing resources, invalid identifiers, insufficient permissions, or rate limits.

Instructions

Get a single label from a project. Use this for a known resource or result; choose the corresponding list or search tool when you need to discover multiple resources. 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
jmespathNoOptional JMESPath expression filtering the JSON result before return.
label_idYesThe ID or title of a project's label
project_idYesProject ID or URL-encoded path
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. Addedv2.1.18
  3. Removedv2.1.14
  4. Addedv2.1.11
  5. Removedv2.1.10
  6. Changed2 schema fields changedv2.1.9
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / required
      Added value: +[
      +  "project_id",
      +  "label_id"
      +]
  7. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already provide readOnlyHint=true and openWorldHint=true. The description adds that missing resources, invalid identifiers, insufficient permission, and rate limits are returned as errors, which is useful behavioral context. It doesn't describe response format or other side-effects, but for a read-only tool with annotations, this is acceptable.

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 a few sentences long and front-loads the primary purpose. It includes necessary clarifications without being verbose. The additional guidance on identifiers and pagination fields is a bit generic but not overly long. Good structure.

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?

Given the tool is a simple get-by-id operation with 4 parameters (all documented in schema) and read-only annotations, the description covers the core usage. It doesn't explain return structure, but no output schema exists. The error behavior is mentioned. It could be more specific about the 'include_ancestor_groups' parameter behavior, but that is in the schema. Overall adequate.

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 each parameter is documented in the schema. The description adds a note about providing numeric ID or URL-encoded path for project_id/group_id, which adds value. However, this is only a minor addition; most parameter meaning comes from the schema.

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 clearly states it gets a single label from a project, a specific verb and resource. It distinguishes itself from list/search tools by explicitly mentioning known resource vs discovery. However, it doesn't name a specific sibling like list_labels, so it's not fully differentiating.

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 direction: use this for a known resource or result, and choose the corresponding list or search tool for discovery. This is a clear when-to-use statement. It doesn't explicitly exclude alternatives by name, but the guidance is sufficient.

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