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),
          },
        ],
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'Gets pipelines' but lacks details on permissions required, rate limits, pagination, return format, or whether it's read-only (implied but not explicit). This is a significant gap for a tool that likely interacts with an external API, making it inadequate for safe and effective use.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose and includes the optional filtering detail. There is no wasted text, making it highly concise and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a GitLab API tool with no annotations and no output schema, the description is incomplete. It fails to address key aspects like authentication needs, error handling, response format, or pagination, which are critical for an agent to use this tool correctly in a real-world scenario.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents the parameters (projectPath and ref). The description adds minimal value by mentioning optional filtering by branch/ref, which is already clear from the schema. No additional semantics or examples are provided, resulting in a baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Gets') and resource ('pipelines for a GitLab project'), making the purpose unambiguous. However, it does not explicitly differentiate from sibling tools like 'gitlab_get_pipeline_details' or 'gitlab_get_merge_request_pipelines', which might retrieve similar data in different contexts, so it falls short of a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as 'gitlab_get_pipeline_details' for specific pipeline info or 'gitlab_get_merge_request_pipelines' for MR-related pipelines. It mentions optional filtering by branch/ref but does not clarify use cases or exclusions, leaving the agent to infer usage from context alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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