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) }] };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool deletes a label, implying a destructive mutation, but does not cover critical aspects such as permissions required (e.g., project maintainer access), whether deletion is permanent or reversible, error conditions (e.g., if the label doesn't exist), or rate limits. This leaves significant gaps for safe and effective use.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core action without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's destructive nature (implied by 'Delete'), lack of annotations, no output schema, and minimal parameter guidance, the description is incomplete. It fails to address key contextual elements like success/error responses, side effects, or integration with sibling tools (e.g., 'list_labels'), leaving the agent poorly equipped for reliable invocation.

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?

The description does not add any meaning beyond the input schema, which has 0% description coverage. It does not explain what 'project_id' or 'name' represent (e.g., project identifier format, label name constraints). However, with only 2 parameters and no schema descriptions, the baseline is 3 as the description does not compensate for the lack of schema details but also does not mislead.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete') and resource ('a label from a GitLab project'), making the purpose unambiguous. However, it does not differentiate from sibling tools like 'delete_group_milestone' or 'delete_milestone' by specifying what type of label (e.g., issue label vs. other label types) or any scope limitations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. For example, it does not mention prerequisites (e.g., the label must exist), when not to use it (e.g., if the label is in use), or refer to sibling tools like 'list_labels' for checking existing labels or 'update_label' for modifications instead of deletion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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