Skip to main content
Glama
Alosies

GitLab MCP Server

by Alosies

retry_pipeline

Retry a failed GitLab CI/CD pipeline by specifying the project and pipeline ID to restart the build process.

Instructions

Retry a failed pipeline

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID or path
pipeline_idYesPipeline ID

Implementation Reference

  • The handler function that executes the retry_pipeline tool by posting to the GitLab API endpoint to retry the specified pipeline and returns the result as JSON.
    async retryPipeline(args: PipelineActionParams) {
      const data = await this.client.post(`/projects/${encodeURIComponent(args.project_id)}/pipelines/${args.pipeline_id}/retry`);
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(data, null, 2),
          },
        ],
      };
    }
  • The tool schema definition including name, description, and input schema for the retry_pipeline tool.
    {
      name: 'retry_pipeline',
      description: 'Retry a failed pipeline',
      inputSchema: {
        type: 'object',
        properties: {
          project_id: {
            type: 'string',
            description: 'Project ID or path',
          },
          pipeline_id: {
            type: 'number',
            description: 'Pipeline ID',
          },
        },
        required: ['project_id', 'pipeline_id'],
      },
    },
  • src/server.ts:299-302 (registration)
    The switch case that registers and dispatches calls to the retry_pipeline handler in the MCP server's tool request handler.
    case "retry_pipeline":
      return await this.pipelineHandlers.retryPipeline(
        args as unknown as PipelineActionParams
      );

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/Alosies/gitlab-mcp-server'

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