Skip to main content
Glama

gitlab_get_project_pipelines

Retrieve GitLab project pipelines to monitor CI/CD status, with optional filtering by branch or ref for targeted workflow visibility.

Instructions

Gets pipelines for a GitLab project, optionally filtered by branch/ref.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesThe path of the GitLab project (e.g., "namespace/project-name").
refNoOptional: Branch or ref to filter pipelines.

Implementation Reference

  • The main handler function that executes the tool logic by calling the GitLab API to retrieve pipelines for a project, optionally filtered by ref.
    async getProjectPipelines(projectPath: string, ref?: string): Promise<any[]> { const encodedProjectPath = encodeURIComponent(projectPath); let endpoint = `projects/${encodedProjectPath}/pipelines`; if (ref) { endpoint += `?ref=${encodeURIComponent(ref)}`; } return this.callGitLabApi<any[]>(endpoint); }
  • src/index.ts:611-627 (registration)
    Tool registration in the allTools array, defining the tool name, description, and input schema.
    name: 'gitlab_get_project_pipelines', description: 'Gets pipelines for a GitLab project, optionally filtered by branch/ref.', inputSchema: { type: 'object', properties: { projectPath: { type: 'string', description: 'The path of the GitLab project (e.g., "namespace/project-name").', }, ref: { type: 'string', description: 'Optional: Branch or ref to filter pipelines.', }, }, required: ['projectPath'], }, },
  • The MCP server request handler that processes calls to the tool, validates GitLab service availability, extracts arguments, calls the service method, and returns the result as JSON text.
    case 'gitlab_get_project_pipelines': { if (!gitlabService) { throw new Error('GitLab service is not initialized.'); } const { projectPath, ref } = args as { projectPath: string; ref?: string }; const result = await gitlabService.getProjectPipelines(projectPath, ref); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }

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/HainanZhao/mcp-gitlab-jira'

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