Skip to main content
Glama

delete_label

Remove labels from GitLab projects to maintain organized issue tracking and project management workflows.

Instructions

Delete a label from a GitLab project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
nameYes

Implementation Reference

  • 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);
    }
  • 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) }] };

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/TheRealChrisThomas/gitlab-mcp-server'

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