Skip to main content
Glama
Alosies
by Alosies

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
NameRequiredDescriptionDefault
pipeline_idYesPipeline ID
project_idYesProject ID or path

Implementation Reference

  • 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), }, ], }; }
  • 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'], }, },
  • 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 );

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/Alosies/gitlab-mcp-server'

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