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
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No | Project ID or URL-encoded path | |
| name | Yes | The name of the label | |
| color | Yes | The color of the label given in 6-digit hex notation with leading '#' sign | |
| description | No | The description of the label | |
| priority | No | The priority of the label |
Implementation Reference
- schemas.ts:1467-1475 (schema)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"), });
- schemas.ts:654-667 (schema)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(), });