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
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID or path | |
| pipeline_id | Yes | Pipeline ID |
Implementation Reference
- src/handlers/pipelines.ts:74-85 (handler)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), }, ], }; }
- src/tools/pipelines.ts:122-139 (schema)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 );