Skip to main content
Glama

create_label

Create custom labels in GitLab projects to organize issues and merge requests with specific colors, descriptions, and priority levels.

Instructions

Create a new label in a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoProject ID or URL-encoded path
nameYesThe name of the label
colorYesThe color of the label given in 6-digit hex notation with leading '#' sign
descriptionNoThe description of the label
priorityNoThe priority of the label

Implementation Reference

  • Zod schema defining input parameters for creating a GitLab project label: project_id (required), name (required), color (required hex string), description (optional), priority (optional number). Used for input validation of the 'create_label' MCP tool.
    export const CreateLabelSchema = z.object({ project_id: z.coerce.string().describe("Project ID or URL-encoded path"), name: z.string().describe("The name of the label"), color: z .string() .describe("The color of the label given in 6-digit hex notation with leading '#' sign"), description: z.string().optional().describe("The description of the label"), priority: z.number().nullable().optional().describe("The priority of the label"), });
  • Zod schema for GitLab label response object, likely used for output validation of label-related tools including 'create_label'.
    export const GitLabLabelSchema = z.object({ id: z.coerce.string(), name: z.string(), color: z.string(), text_color: z.string(), description: z.string().nullable(), description_html: z.string().nullable(), open_issues_count: z.number().optional(), closed_issues_count: z.number().optional(), open_merge_requests_count: z.number().optional(), subscribed: z.boolean().optional(), priority: z.number().nullable().optional(), is_project_label: z.boolean().optional(), });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zereight/gitlab-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server