gitlab_get_merge_request_pipelines
Retrieve pipeline status and details for a GitLab merge request to monitor CI/CD progress and identify potential issues.
Instructions
Gets pipelines for a specific GitLab Merge Request.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mrUrl | Yes | The URL of the GitLab Merge Request. |
Implementation Reference
- src/index.ts:1776-1790 (handler)MCP tool handler that extracts mrUrl from arguments, calls the GitLabService.getMergeRequestPipelines method, and returns the JSON-stringified result.case 'gitlab_get_merge_request_pipelines': { if (!gitlabService) { throw new Error('GitLab service is not initialized.'); } const { mrUrl } = args as { mrUrl: string }; const result = await gitlabService.getMergeRequestPipelines(mrUrl); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:628-641 (schema)Tool schema definition including input schema requiring 'mrUrl' and description.{ name: 'gitlab_get_merge_request_pipelines', description: 'Gets pipelines for a specific GitLab Merge Request.', inputSchema: { type: 'object', properties: { mrUrl: { type: 'string', description: 'The URL of the GitLab Merge Request.', }, }, required: ['mrUrl'], }, },
- src/index.ts:1182-1182 (registration)The tool is registered in the allTools array, which is filtered based on service availability and returned in ListToolsRequest.];
- src/gitlab.service.ts:530-536 (helper)GitLabService method that parses the MR URL to get projectPath and mrIid, then calls the GitLab API endpoint for merge request pipelines.async getMergeRequestPipelines(mrUrl: string): Promise<any[]> { const { projectPath, mrIid } = this.parseMrUrl(mrUrl, this.config.url); const encodedProjectPath = encodeURIComponent(projectPath); return this.callGitLabApi<any[]>( `projects/${encodedProjectPath}/merge_requests/${mrIid}/pipelines`, ); }