Skip to main content
Glama

create_label

Create a new label in a GitLab project by specifying project ID, name, and color. Use it to add labels with optional priority and description for better issue and merge request organization.

Instructions

Create a new label in a project. Use this for a new resource or action; choose the corresponding update or edit tool when the resource already exists. It changes remote GitLab state and requires the necessary project or group permission; GitLab returns validation, conflict, permission, or rate-limit errors instead of silently applying an invalid request. 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
nameYesThe name of the label
colorYesThe color of the label given in 6-digit hex notation with leading '#' sign
jmespathNoOptional JMESPath expression filtering the JSON result before return.
priorityNoThe priority of the label
project_idYesProject ID or URL-encoded path
descriptionNoThe description of the label

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.62
    • changedInput schema / required
      Previous value: -[
      -  "name",
      -  "color",
      -  "project_id"
      -]New value: +[
      +  "project_id",
      +  "name",
      +  "color"
      +]
  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
    • changedInput schema / required
      Previous value: -[
      -  "name",
      -  "color"
      -]New value: +[
      +  "name",
      +  "color",
      +  "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?

With only openWorldHint in annotations, the description carries the disclosure burden and meets it well: it states that the tool 'changes remote GitLab state,' requires 'the necessary project or group permission,' and that GitLab returns 'validation, conflict, permission, or rate-limit errors instead of silently applying an invalid request.' This gives concrete behavioral expectations.

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 core purpose and is reasonably compact. However, the final sentence contains boilerplate about identifiers and pagination fields that adds little specific value and could be trimmed.

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?

The description covers purpose, usage timing, side effects, permissions, error behavior, and identifier format, which is strong for a create operation. Since there is no output schema, it could have explicitly stated that the created label is returned, but the absence is a minor gap given the otherwise thorough context.

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 every parameter. The description adds only general guidance about numeric IDs or URL-encoded paths, which mostly repeats the schema's project_id description; the mention of 'pagination fields' is generic and not represented in this schema, so it does not meaningfully improve parameter understanding.

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 opens with a specific verb and resource: 'Create a new label in a project.' It also distinguishes itself from update/edit tools by saying to 'choose the corresponding update or edit tool when the resource already exists,' which separates it from siblings like update_label and delete_label.

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?

The description explicitly states when to use this tool ('for a new resource or action') and when not to ('choose the corresponding update or edit tool when the resource already exists'). It also adds operational context about required permissions and remote state changes, giving an agent clear selection criteria.

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