Skip to content

Debug Pipeline Failures

Quickly diagnose and fix CI/CD failures using GitLab MCP.

Find Failed Pipelines

"Show me failed pipelines in my-org/api"

"What's the status of the latest pipeline on main?"

json
{
  "action": "list",
  "project_id": "my-org/api",
  "status": "failed",
  "per_page": 5
}
json
{
  "action": "list",
  "project_id": "my-org/api",
  "ref": "main",
  "per_page": 1
}

Identify Failed Jobs

"Which jobs failed in pipeline #1234?"

"Show me all jobs in the failed pipeline"

json
{
  "action": "jobs",
  "project_id": "my-org/api",
  "pipeline_id": "1234",
  "job_scope": ["failed"],
  "per_page": 20
}
json
{
  "action": "jobs",
  "project_id": "my-org/api",
  "pipeline_id": "1234",
  "per_page": 50
}

Read Error Logs

"Show me the logs for job #5678"

"What's the error in the test job?"

json
{
  "action": "logs",
  "project_id": "my-org/api",
  "job_id": "5678"
}
json
{
  "action": "logs",
  "project_id": "my-org/api",
  "job_id": "5678",
  "start": -100,
  "limit": 100
}

Common Failure Patterns

Test Failures

"Show me the test job logs — I need to see which tests failed"

Look for patterns like:

  • FAIL src/__tests__/auth.test.ts — Specific test file failure
  • Expected: X, Received: Y — Assertion mismatch
  • Timeout — Test exceeded time limit

Build Errors

"The build job failed — show me the compilation errors"

Look for:

  • error TS2345 — TypeScript type errors
  • Module not found — Missing dependencies
  • SyntaxError — Code syntax issues

Dependency Issues

"The install job failed — is there a package issue?"

Look for:

  • ERESOLVE — Version conflicts
  • 404 Not Found — Package registry issues
  • EACCES — Permission problems

Retry or Cancel

"Retry the failed jobs in pipeline #1234"

"Cancel the running pipeline on my feature branch"

jsonc
// manage_pipeline
{
  "action": "retry",
  "project_id": "my-org/api",
  "pipeline_id": "1234"
}
jsonc
// manage_pipeline
{
  "action": "cancel",
  "project_id": "my-org/api",
  "pipeline_id": "1234"
}
jsonc
// manage_pipeline_job
{
  "action": "retry",
  "project_id": "my-org/api",
  "job_id": "5678"
}

Next Steps

Released under the Apache 2.0 License.