Skip to main content
Glama

gitlab_list_cicd_variables

Retrieve CI/CD variables for a specific GitLab project using the project ID or URL-encoded path, enabling streamlined pipeline configuration and management.

Instructions

List CI/CD variables for a project

Input Schema

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

Implementation Reference

  • The handler function that implements the core logic of the gitlab_list_cicd_variables tool by validating input and calling the CI/CD manager.
    /**
     * List CI/CD variables handler
     */
    export const listCiCdVariables: ToolHandler = async (params, context) => {
      const { project_id } = params.arguments || {};
      if (!project_id) {
        throw new McpError(ErrorCode.InvalidParams, 'project_id is required');
      }
      
      const data = await context.ciCdManager.listCiCdVariables(project_id as string | number);
      return formatResponse(data);
    };
  • The input schema definition specifying parameters for the gitlab_list_cicd_variables tool.
      name: 'gitlab_list_cicd_variables',
      description: 'List CI/CD variables for a project',
      inputSchema: {
        type: 'object',
        properties: {
          project_id: {
            type: 'string',
            description: 'The ID or URL-encoded path of the project'
          }
        },
        required: ['project_id']
      }
    },
  • Registration of the tool name to its handler function in the central tool registry.
    gitlab_list_cicd_variables: cicdHandlers.listCiCdVariables,
  • Import of the cicd-handlers module containing the listCiCdVariables function.
    import * as cicdHandlers from "../handlers/cicd-handlers.js";

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