Skip to main content
Glama

Opsphere — DevOps & SRE Intelligence

Diagnose failed GitLab pipeline

gl_pipeline_diagnose
Read-only

Identify which job failed in a pipeline and show its trace log. Without pipelineId it finds the last failed pipeline (optional branch filter).

Input Schema

NameRequiredDescriptionDefault
branchNoBranch when searching last failed
projectYesProject path, ID, or repo slug under namespace
namespaceNo
tailLinesNo
context_idNoOptional explicit Connection Hub work context (ctx_*). Omit to use the conversation's active workspace; global Hub tools ignore it.
pipelineIdNoPipeline ID (omit for last failed)

Output Schema

NameRequiredDescriptionDefault
okYes
dataYes
contractVersionYes
dataSchemaVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • addedOutput schema / properties / data / properties / failedJobs
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "failureReason": {
      +        "type": "string"
      +      },
      +      "id": {
      +        "type": "integer"
      +      },
      +      "logExcerpt": {
      +        "type": "string"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "stage": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "name"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / data / properties / format
      Removed value: -{
      -  "enum": [
      -    "plain",
      -    "markdown",
      -    "json"
      -  ],
      -  "type": "string"
      -}
    • addedOutput schema / properties / data / properties / gaps
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / data / properties / jobs
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "id": {
      +        "type": "integer"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "stage": {
      +        "type": "string"
      +      },
      +      "status": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "name"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / data / properties / partial
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / data / properties / pipeline
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "createdOn": {
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "durationSec": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "id": {
      +      "type": "integer"
      +    },
      +    "iid": {
      +      "type": "integer"
      +    },
      +    "ref": {
      +      "type": "string"
      +    },
      +    "status": {
      +      "type": "string"
      +    },
      +    "webUrl": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "status"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / properties / data / properties / text
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / data / properties / warnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / data / required
      Previous value: -[
      -  "text"
      -]New value: +[
      +  "pipeline",
      +  "jobs",
      +  "failedJobs",
      +  "partial",
      +  "warnings",
      +  "gaps"
      +]
    • addedOutput schema / properties / dataSchemaVersion
      Added value: +{
      +  "const": 2,
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "contractVersion",
      -  "ok",
      -  "data"
      -]New value: +[
      +  "contractVersion",
      +  "dataSchemaVersion",
      +  "ok",
      +  "data"
      +]
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds genuinely new behavior: a fallback mode that resolves the last failed pipeline when pipelineId is omitted, plus an optional branch filter and the fact that a trace log is returned. It omits edge behavior such as what happens when no failed pipeline exists.

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?

Two short sentences, front-loaded with the core action and then the fallback condition. Every clause earns its place with no filler.

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?

An output schema exists, so return-value explanation is unnecessary, and annotations cover the safety profile. For a 6-parameter diagnostic tool the description is nearly complete, with the remaining gap being what the tool does when no failed pipeline is found and how tailLines affects output.

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 coverage is 67%, above the low-coverage threshold, so the schema carries most of the burden. The description explains pipelineId's optionality and branch's role, but says nothing about tailLines, namespace, or the context_id work-context parameter, so it adds only marginal meaning over structured data.

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 names a specific verb and resource pair ('identify which job failed', 'show its trace log') that is clearly distinct from siblings like gl_pipeline_get or gl_pipelines_latest. It never names those siblings explicitly, so differentiation is inferable rather than stated.

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

Usage Guidelines3/5

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

The clause 'Without pipelineId it finds the last failed pipeline (optional branch filter)' gives useful conditional context for how to invoke the fallback mode. However, there is no explicit when-to-use/when-not guidance and no routing to alternatives such as gl_pipeline_get for a successful pipeline or bb_pipeline_diagnose for Bitbucket.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources