retry_pipeline
Restart a failed GitLab pipeline by specifying the project and pipeline ID to re-execute the build process.
Instructions
Retry a failed pipeline
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pipeline_id | Yes | Pipeline ID | |
| project_id | Yes | Project ID or path |
Implementation Reference
- src/handlers/pipelines.ts:74-85 (handler)The `retryPipeline` method in the PipelineHandlers class that implements the core logic of the retry_pipeline tool. It sends a POST request to GitLab's pipeline retry endpoint and returns the response as formatted 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 specification for 'retry_pipeline' defining its name, description, and input schema (project_id and pipeline_id required). This is part of the exported pipelineTools array used for tool listing.{ 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)Dispatch logic in the MCP server's CallToolRequest handler that routes calls to the 'retry_pipeline' tool to the corresponding PipelineHandlers method.case "retry_pipeline": return await this.pipelineHandlers.retryPipeline( args as unknown as PipelineActionParams );