Skip to main content
Glama

gitlab_delete_cicd_variable

Remove a specific CI/CD variable from a project in GitLab by specifying the variable key and project ID using the GitLab MCP Server.

Instructions

Delete a CI/CD variable

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesThe key of the variable
project_idYesThe ID or URL-encoded path of the project

Implementation Reference

  • The handler function implementing the gitlab_delete_cicd_variable tool. It extracts project_id and key from arguments, validates them, calls context.ciCdManager.deleteCiCdVariable, and formats the response.
    export const deleteCiCdVariable: ToolHandler = async (params, context) => {
      const { project_id, key } = params.arguments || {};
      if (!project_id || !key) {
        throw new McpError(ErrorCode.InvalidParams, 'project_id and key are required');
      }
      
      const data = await context.ciCdManager.deleteCiCdVariable(project_id as string | number, key as string);
      return formatResponse(data);
    }; 
  • The input schema and metadata definition for the gitlab_delete_cicd_variable tool.
    {
      name: 'gitlab_delete_cicd_variable',
      description: 'Delete a CI/CD variable',
      inputSchema: {
        type: 'object',
        properties: {
          project_id: {
            type: 'string',
            description: 'The ID or URL-encoded path of the project'
          },
          key: {
            type: 'string',
            description: 'The key of the variable'
          }
        },
        required: ['project_id', 'key']
      }
    },
  • Registration of the gitlab_delete_cicd_variable tool name mapping to its handler function in the central toolRegistry.
    gitlab_delete_cicd_variable: cicdHandlers.deleteCiCdVariable,
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the destructive action ('Delete') but doesn't elaborate on consequences (e.g., irreversible deletion, impact on pipelines), authentication requirements, error conditions, or rate limits. This is a significant gap for a mutation tool with zero annotation coverage.

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, efficient sentence with zero wasted words. It is front-loaded with the core action and resource, making it immediately scannable and appropriately sized for a simple delete operation.

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?

For a destructive mutation tool with no annotations and no output schema, the description is incomplete. It lacks critical context like behavioral traits (e.g., irreversibility, permissions), error handling, or what happens post-deletion. While concise, it doesn't compensate for the absence of structured data, leaving gaps in understanding.

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?

Schema description coverage is 100%, with both parameters ('key' and 'project_id') clearly documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. Baseline score of 3 is appropriate since the schema does the heavy lifting.

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 CI/CD variable'), making the purpose immediately understandable. It distinguishes from sibling tools like 'gitlab_get_cicd_variable' and 'gitlab_update_cicd_variable' by specifying deletion rather than retrieval or modification. However, it doesn't specify scope (e.g., project-level) beyond what's implied by parameters.

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 explicit guidance on when to use this tool versus alternatives is provided. The description doesn't mention prerequisites (e.g., needing admin permissions), when not to use it (e.g., for group-level variables), or refer to related tools like 'gitlab_list_cicd_variables' for context. Usage is implied by the action but lacks contextual boundaries.

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

Related 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/rifqi96/mcp-gitlab'

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