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
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | The key of the variable | |
| project_id | Yes | The ID or URL-encoded path of the project |
Input Schema (JSON Schema)
{
"properties": {
"key": {
"description": "The key of the variable",
"type": "string"
},
"project_id": {
"description": "The ID or URL-encoded path of the project",
"type": "string"
}
},
"required": [
"project_id",
"key"
],
"type": "object"
}
Implementation Reference
- src/handlers/cicd-handlers.ts:160-168 (handler)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); };
- src/utils/tools-data.ts:698-715 (schema)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'] } },
- src/utils/tool-registry.ts:60-60 (registration)Registration of the gitlab_delete_cicd_variable tool name mapping to its handler function in the central toolRegistry.gitlab_delete_cicd_variable: cicdHandlers.deleteCiCdVariable,