Skip to main content
Glama

gitlab_retry_pipeline

Retry all failed or canceled jobs in an existing GitLab pipeline by pipeline ID and project path. Creates new job runs and has no effect if all jobs already passed.

Instructions

Retry all failed jobs of an existing pipeline.

Creates new job runs (new history entries). Safe to call when the pipeline has at least one failed/canceled job; has no effect if everything already passed.

Examples: - "Retry the failed jobs in pipeline 123" → pipeline_id=123 - Don't use to rerun a successful pipeline — use gitlab_trigger_pipeline instead.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pipeline_id": "<pipeline_id>",
      "project_path": "<project_path>"
    },
    "name": "gitlab_retry_pipeline"
  }
}

Input Schema

NameRequiredDescriptionDefault
pipeline_idYesPipeline ID to retry failed jobs for.
project_pathYesGitLab project path (e.g. 'my-org/my-repo'). Required by default. For legacy deployments only, set GITLAB_ALLOW_DEFAULT_PROJECT=true to use GITLAB_PROJECT_PATH when omitted.

Output Schema

NameRequiredDescriptionDefault
refNo
statusNo
web_urlNo
created_atNo
pipeline_idNo
status_noteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.5.5
    • removedInput schema / properties / project_path / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / project_path / default
      Removed value: -null
    • changedInput schema / properties / project_path / description
      Previous value: -"GitLab project path (e.g. 'my-org/my-repo'). When omitted, the default from GITLAB_PROJECT_PATH env var is used."New value: +"GitLab project path (e.g. 'my-org/my-repo'). Required by default. For legacy deployments only, set GITLAB_ALLOW_DEFAULT_PROJECT=true to use GITLAB_PROJECT_PATH when omitted."
    • addedInput schema / properties / project_path / minLength
      Added value: +1
    • addedInput schema / properties / project_path / type
      Added value: +"string"
    • changedInput schema / required
      Previous value: -[
      -  "pipeline_id"
      -]New value: +[
      +  "pipeline_id",
      +  "project_path"
      +]
  2. First observedv0.5.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only flag this as a non-read-only, non-destructive, non-idempotent, open-world call; the description adds the material fact that it creates new job runs and new history entries, plus the no-op condition. It does not cover required permissions or what happens when only some jobs fail, which is the remaining gap for a mutation tool.

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 operative sentence is front-loaded, followed by side-effect and no-op notes, then a compact example block. Every sentence contributes; nothing is redundant with the annotations or schema.

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

Completeness4/5

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

With annotations carrying the safety profile and an output schema covering return values, the description supplies what is missing: mutation effects, no-op behavior, and sibling routing. Only permission/auth expectations are absent, a minor omission for this tool class.

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

Parameters4/5

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

Schema coverage is 100%, so both parameters are already documented in structured form, but the example ('Retry the failed jobs in pipeline 123' → pipeline_id=123) shows how a natural-language request maps onto the required ID. It adds modest but real invocation guidance beyond the schema.

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?

States a specific verb and resource — 'Retry all failed jobs of an existing pipeline' — and immediately distinguishes itself from the sibling that reruns successful pipelines (gitlab_trigger_pipeline). An agent can route correctly without opening either schema.

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?

Gives an explicit use condition ('safe to call when the pipeline has at least one failed/canceled job'), an explicit no-op condition ('has no effect if everything already passed'), and an explicit negative case pointing to the named alternative gitlab_trigger_pipeline. Nothing is left to inference.

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