get_pipeline
Retrieve detailed information about a specific GitLab pipeline using project ID and pipeline ID to monitor build status, stages, and execution details.
Instructions
Get details of a specific 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:40-51 (handler)The main handler function for the 'get_pipeline' tool. It fetches the pipeline details from the GitLab API using the provided project_id and pipeline_id, then returns the data as a formatted JSON string in the MCP response format.async getPipeline(args: GetPipelineParams) { const data = await this.client.get(`/projects/${encodeURIComponent(args.project_id)}/pipelines/${args.pipeline_id}`); return { content: [ { type: 'text', text: JSON.stringify(data, null, 2), }, ], }; }
- src/tools/pipelines.ts:69-86 (registration)Registers the 'get_pipeline' tool in the MCP SDK Tool array (pipelineTools), defining its name, description, and input schema for validation.{ name: 'get_pipeline', description: 'Get details of a specific 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/types.ts:362-365 (schema)TypeScript interface defining the input parameters (project_id and pipeline_id) for the get_pipeline tool, used by the handler for type safety.export interface GetPipelineParams { project_id: string; pipeline_id: number; }
- src/server.ts:291-294 (registration)Dispatches the 'get_pipeline' tool call to the appropriate handler (pipelineHandlers.getPipeline) in the main MCP server request handler.case "get_pipeline": return await this.pipelineHandlers.getPipeline( args as unknown as GetPipelineParams );