Skip to main content
Glama

gitlab_list_pipeline_jobs

Retrieve jobs from a specific GitLab CI/CD pipeline to debug failures, check statuses, and locate artifacts with paginated results.

Instructions

List jobs in a specific pipeline Returns: Array of jobs with status, timing, and artifact information Use when: Debugging pipeline failures, checking job status, finding artifacts Pagination: Yes (default 20 per page) Details: Includes job stage, status, duration, runner info

Example response: [{ "id": 12345, "name": "test:unit", "stage": "test", "status": "success", "created_at": "2023-01-01T10:00:00Z", "duration": 120.5, "artifacts": [{"filename": "coverage.xml"}], "web_url": "https://gitlab.com/group/project/-/jobs/12345" }]

Related tools:

  • gitlab_list_pipelines: Find pipeline IDs

  • gitlab_download_job_artifact: Get job artifacts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoProject identifier (auto-detected if not provided) Type: integer OR string Format: numeric ID or 'namespace/project' Optional: Yes - auto-detects from current git repository Examples: - 12345 (numeric ID) - 'gitlab-org/gitlab' (namespace/project path) - 'my-group/my-subgroup/my-project' (nested groups) Note: If in a git repo with GitLab remote, this can be omitted
pipeline_idYesPipeline ID Type: integer Format: Numeric pipeline identifier Example: 12345 How to find: From pipeline URLs or gitlab_list_pipelines response
per_pageNoNumber of results per page Type: integer Range: 1-100 Default: 20 Example: 50 (for faster browsing) Tip: Use smaller values (10-20) for detailed operations, larger (50-100) for listing
pageNoPage number for pagination Type: integer Range: ≥1 Default: 1 Example: 3 (to get the third page of results) Note: Use with per_page to navigate large result sets

Implementation Reference

  • The handler function that implements the core logic for the gitlab_list_pipeline_jobs tool. It resolves the project ID (auto-detecting from git if not provided), requires the pipeline_id, handles pagination parameters with defaults, and delegates to the GitLabClient's list_pipeline_jobs method.
    def handle_list_pipeline_jobs(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]:
        """Handle listing jobs in a pipeline"""
        project_id = require_project_id(client, arguments)
        pipeline_id = require_argument(arguments, "pipeline_id")
        per_page = get_argument(arguments, "per_page", DEFAULT_PAGE_SIZE)
        page = get_argument(arguments, "page", 1)
        
        return client.list_pipeline_jobs(project_id, pipeline_id, per_page=per_page, page=page)
  • The tool schema definition including input parameters validation (project_id optional, pipeline_id required, pagination), description referencing constants, and MCP Tool type registration.
        name=TOOL_LIST_PIPELINE_JOBS,
        description=desc.DESC_LIST_PIPELINE_JOBS,
        inputSchema={
            "type": "object",
            "properties": {
                "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID},
                "pipeline_id": {"type": "integer", "description": desc.DESC_PIPELINE_ID},
                "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE},
                "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1}
            },
            "required": ["pipeline_id"]
        }
    ),
  • Registration of the tool handler in the central TOOL_HANDLERS dictionary, mapping the tool name 'gitlab_list_pipeline_jobs' to its implementation function.
    TOOL_LIST_PIPELINE_JOBS: handle_list_pipeline_jobs,
    TOOL_LIST_PROJECT_JOBS: handle_list_project_jobs,
  • Constant definition for the tool name string, used consistently across handler registration, schema, tests, and documentation.
    TOOL_LIST_PIPELINE_JOBS = "gitlab_list_pipeline_jobs"
Behavior5/5

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

With no annotations provided, the description carries full burden and excels. It discloses pagination behavior ('Yes (default 20 per page)'), response format details ('Array of jobs with status, timing, and artifact information'), and includes a concrete example response with key fields. This goes well beyond basic functionality to explain operational characteristics.

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

Conciseness4/5

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

The description is well-structured with clear sections (purpose, returns, use when, pagination, details, example, related tools) and every sentence adds value. It's slightly longer than minimal but efficiently organized, with no redundant information. The example response is helpful but adds length.

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

Completeness5/5

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

For a read-only listing tool with no annotations but 100% schema coverage, the description provides excellent context: clear purpose, usage scenarios, behavioral details (pagination, response format), example output, and related tools. It compensates for the lack of output schema by describing the return structure and providing an example.

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 already fully documents all four parameters. The description doesn't add any parameter-specific information beyond what's in the schema. According to guidelines, when schema coverage is high (>80%), the baseline is 3 even with no param info in description.

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

Purpose5/5

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

The description explicitly states 'List jobs in a specific pipeline' with a clear verb ('List') and resource ('jobs'), distinguishing it from sibling tools like 'gitlab_list_pipelines' (which lists pipelines) and 'gitlab_list_project_jobs' (which lists all jobs in a project). The purpose is specific and unambiguous.

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

Usage Guidelines5/5

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

The description includes a dedicated 'Use when:' section listing three specific scenarios (debugging pipeline failures, checking job status, finding artifacts), and a 'Related tools:' section explicitly names 'gitlab_list_pipelines' as a prerequisite for finding pipeline IDs and 'gitlab_download_job_artifact' as a follow-up. This provides clear when-to-use guidance and alternatives.

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/Vijay-Duke/mcp-gitlab'

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