Skip to main content
Glama

Opsphere — DevOps & SRE Intelligence

GHE Actions: Diagnose Failed Workflow

ghe_actions_diagnose
Read-only

Auto-diagnose the last failed workflow run: finds the failed run, identifies failed jobs/steps, and returns their logs. Without a workflow filter it searches across all workflows. Returns: run info, all jobs (with steps), and logs for each failed job.

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name or full owner/name slug. Prefer owner/name when known so routing never depends on a workspace default.
ownerNoOptional GitHub org/user. A full repo slug (owner/name) takes precedence; otherwise the active workspace default org is used.
branchNoFilter by branch (optional)
workflowNoFilter by workflow name, path, or ID (optional)
tailLinesNoLog lines to show per failed job
context_idNoOptional explicit Connection Hub work context (ctx_*). Omit to use the conversation's active workspace; global Hub tools ignore it.

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": {
      +      "entries": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "level": {
      +              "enum": [
      +                "trace",
      +                "debug",
      +                "info",
      +                "warn",
      +                "error",
      +                "fatal",
      +                "unknown"
      +              ],
      +              "type": "string"
      +            },
      +            "message": {
      +              "type": "string"
      +            },
      +            "timestamp": {
      +              "$ref": "#/properties/data/properties/run/properties/createdAt"
      +            },
      +            "traceId": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "message"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "job": {
      +        "$ref": "#/properties/data/properties/jobs/items"
      +      },
      +      "logExcerpt": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "job",
      +      "logExcerpt"
      +    ],
      +    "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": {
      +      "completedAt": {
      +        "$ref": "#/properties/data/properties/run/properties/createdAt"
      +      },
      +      "conclusion": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "id": {
      +        "type": "integer"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "startedAt": {
      +        "$ref": "#/properties/data/properties/run/properties/createdAt"
      +      },
      +      "status": {
      +        "type": "string"
      +      },
      +      "steps": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "conclusion": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "name": {
      +              "type": "string"
      +            },
      +            "number": {
      +              "type": "integer"
      +            },
      +            "status": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "name",
      +            "status",
      +            "conclusion",
      +            "number"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "name",
      +      "status",
      +      "conclusion"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / data / properties / partial
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / data / properties / run
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "actor": {
      +      "type": "string"
      +    },
      +    "branch": {
      +      "type": "string"
      +    },
      +    "conclusion": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "createdAt": {
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "durationSeconds": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "htmlUrl": {
      +      "type": "string"
      +    },
      +    "id": {
      +      "type": "integer"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "status": {
      +      "type": "string"
      +    },
      +    "updatedAt": {
      +      "$ref": "#/properties/data/properties/run/properties/createdAt"
      +    },
      +    "workflowId": {
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "workflowId",
      +    "status",
      +    "conclusion",
      +    "branch",
      +    "createdAt",
      +    "updatedAt",
      +    "durationSeconds",
      +    "htmlUrl"
      +  ],
      +  "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: +[
      +  "run",
      +  "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.7/5.0
Behavior4/5

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

Annotations already declare readOnly/non-destructive/closed, so the safety profile is covered. The description adds real value beyond that: it explains the auto-discovery logic (find the last failed run) and the exact return payload (run info, jobs with steps, per-failed-job logs), including the absence of a workflow filter widening the search.

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?

Front-loaded with the core action, then the filter caveat, then a structured 'Returns:' enumeration. Slight redundancy between 'returns their logs' and the closing 'Returns: ... logs for each failed job', but overall tight and well-ordered.

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 values needn't be spelled out, yet the description summarizes them anyway, which aids selection. With rich annotations and full schema coverage, the description gives an agent everything needed to call it correctly; only explicit sibling routing is missing.

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 100%, so all six parameters are already documented in the schema. The description only adds semantics for the workflow filter's absence and the tail-line log scope; it does not explain branch/repo/owner precedence beyond what the schema states. Baseline 3 is appropriate.

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?

States a specific verb and resource: 'Auto-diagnose the last failed workflow run', then enumerates the sub-actions (find run, identify failed jobs/steps, return logs). It implicitly distinguishes itself from the ghe_actions_latest* siblings by scoping to the last *failed* run, though it never names them explicitly.

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?

It gives one usage condition ('Without a workflow filter it searches across all workflows'), which tells the agent how filtering changes behavior. But it offers no explicit when-to-use-vs-alternative guidance against siblings like ghe_actions_latest_logs or ghe_actions_latest_jobs.

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