Skip to main content
Glama

pipeline_failure_rca

Read-only

Classify recent failed pipelines and jobs into test, dependency, timeout, OOM, or script errors, returning cause and recommended action from trace evidence.

Instructions

[READ] Classify recent failed pipelines: cause + action per pipeline.

The flagship pipeline RCA: pulls the project's recent failed pipelines with their failed jobs and trace tails, classifies each failed job (test-failure / dependency-network / runner-timeout / oom / script-error) from its failure_reason and trace markers, and attaches a cause and a recommended action. Every classification names its matched evidence, not a black-box verdict. Pass 'failed_pipelines' for pure analysis, or a project to pull live.

Args: project: Project id or full path (required unless failed_pipelines given). limit: How many recent failed pipelines to pull (default 10). tail_lines: Trace-tail lines pulled per failed job (default 60). failed_pipelines: Injected rows {id, ref, jobs:[{name, stage, status, failureReason, traceTail}]}; skips the live pull. target: Server target name from config; omit for the default.

Returns dict: {pipelinesEvaluated, classCounts, pipelines:[{pipeline, ref, headlineClass, cause, action, failedJobs:[{job, stage, class, cause, action, evidence}]}], note}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
targetNo
projectNo
tail_linesNo
failed_pipelinesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and the description's '[READ]' prefix is consistent. Beyond that it discloses real behavioral context: it pulls failed jobs plus trace tails, classifies from failure_reason and trace markers, and names matched evidence rather than a black-box verdict. No auth/permission or rate-limit detail, but the evidence-based angle is genuinely informative.

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 a one-line '[READ]' summary and the core behavior before the Args/Returns blocks. The docstring-style layout is somewhat verbose but each section earns its place given the 0% schema coverage and absent output schema.

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?

With no output schema, the description documents the return shape (pipelinesEvaluated, classCounts, per-pipeline headlineClass/cause/action, per-job evidence, note), and with 0% parameter coverage it documents all five args. An agent has what it needs to both call and interpret the result.

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

Parameters5/5

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

Schema coverage is 0% (titles only), so the description carries the full burden and does so: project is 'id or full path (required unless failed_pipelines given)', limit and tail_lines have units/defaults, failed_pipelines documents the injected row shape, and target explains the config lookup. This adds substantial meaning the schema lacks.

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: classifies recent failed pipelines into cause+action. It names the concrete classification taxonomy (test-failure / dependency-network / runner-timeout / oom / script-error), which distinguishes it from siblings like runner_health_rca or pipeline_detail without opening any schema.

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

Usage Guidelines4/5

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

Explicitly gives two usage modes: 'Pass failed_pipelines for pure analysis, or a project to pull live,' clarifying the injection vs live-pull choice. It does not, however, contrast against alternative RCA/detail siblings like runner_health_rca or job_trace_tail for narrower scope.

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