Skip to main content
Glama

gitlab_trigger_pipeline

Initiate a pipeline execution in GitLab by specifying the project, branch, and trigger token. Pass custom variables to control the pipeline flow efficiently.

Instructions

Trigger a pipeline run

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesThe ID or URL-encoded path of the project
refYesThe branch or tag name to run the pipeline for
tokenYesThe trigger token
variablesNoVariables to pass to the pipeline

Implementation Reference

  • The main handler function for gitlab_trigger_pipeline tool. Validates inputs and calls context.ciCdManager.triggerPipeline to execute the pipeline trigger.
    export const triggerPipeline: ToolHandler = async (params, context) => { const { project_id, ref, token, variables } = params.arguments || {}; if (!project_id || !ref || !token) { throw new McpError(ErrorCode.InvalidParams, 'project_id, ref, and token are required'); } const data = await context.ciCdManager.triggerPipeline( project_id as string | number, ref as string, token as string, variables as Record<string, string> | undefined ); return formatResponse(data); };
  • Input schema definition for the gitlab_trigger_pipeline tool, specifying parameters and validation rules.
    name: 'gitlab_trigger_pipeline', description: 'Trigger a pipeline run', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'The ID or URL-encoded path of the project' }, ref: { type: 'string', description: 'The branch or tag name to run the pipeline for' }, token: { type: 'string', description: 'The trigger token' }, variables: { type: 'object', description: 'Variables to pass to the pipeline', additionalProperties: { type: 'string' } } }, required: ['project_id', 'ref', 'token'] } },
  • Registration of the gitlab_trigger_pipeline tool in the central toolRegistry, mapping it to cicdHandlers.triggerPipeline.
    gitlab_trigger_pipeline: cicdHandlers.triggerPipeline,

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