Skip to main content
Glama

gitlab_retry_pipeline

Retry failed GitLab pipelines to resume CI/CD workflows after errors. Specify project path and pipeline ID to restart execution.

Instructions

Retries a failed pipeline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesThe path of the GitLab project.
pipelineIdYesThe ID of the pipeline to retry.

Implementation Reference

  • src/index.ts:718-735 (registration)
    Registration of the 'gitlab_retry_pipeline' tool, including its description and input schema definition.
    { name: 'gitlab_retry_pipeline', description: 'Retries a failed pipeline.', inputSchema: { type: 'object', properties: { projectPath: { type: 'string', description: 'The path of the GitLab project.', }, pipelineId: { type: 'number', description: 'The ID of the pipeline to retry.', }, }, required: ['projectPath', 'pipelineId'], }, },
  • The main handler for the gitlab_retry_pipeline tool within the CallToolRequest handler's switch statement. Extracts arguments and calls GitLabService.retryPipeline.
    case 'gitlab_retry_pipeline': { if (!gitlabService) { throw new Error('GitLab service is not initialized.'); } const { projectPath, pipelineId } = args as { projectPath: string; pipelineId: number }; const result = await gitlabService.retryPipeline(projectPath, pipelineId); return { content: [ { type: 'text', text: `Pipeline retry triggered successfully: ${JSON.stringify(result, null, 2)}`, }, ], }; }
  • Helper method in GitLabService class that implements the core logic: POST request to GitLab API to retry the specified pipeline.
    async retryPipeline(projectPath: string, pipelineId: number): Promise<any> { const encodedProjectPath = encodeURIComponent(projectPath); return this.callGitLabApi<any>( `projects/${encodedProjectPath}/pipelines/${pipelineId}/retry`, 'POST', ); }

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/HainanZhao/mcp-gitlab-jira'

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