delete_label
Remove labels from GitLab projects to maintain organized issue tracking and project management workflows.
Instructions
Delete a label from a GitLab project
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_id": "<project_id>",
"name": "<name>"
},
"name": "delete_label"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | ||
| name | Yes |
Implementation Reference
- src/api/labels.ts:92-104 (handler)The actual implementation of the deleteLabel function which performs the API call.
export async function deleteLabel(projectId: string, name: string): Promise<void> { if (!projectId?.trim()) { throw new Error("Project ID is required"); } if (!name?.trim()) { throw new Error("Label name is required"); } const encodedName = encodeURIComponent(name); const endpoint = `/projects/${encodeProjectId(projectId)}/labels/${encodedName}`; await gitlabDelete(endpoint); } - src/schemas.ts:307-310 (schema)Input validation schema for the delete_label tool.
export const DeleteLabelSchema = z.object({ project_id: z.string(), name: z.string() }); - src/server.ts:319-322 (registration)The tool registration/handling logic within the main server switch statement.
case "delete_label": { const args = DeleteLabelSchema.parse(request.params.arguments); await api.deleteLabel(args.project_id, args.name); return { content: [{ type: "text", text: JSON.stringify({ success: true }, null, 2) }] };