Skip to main content
Glama

Diagnose a Depot CI failure

depot_diagnose_ci_failure
Read-onlyIdempotent

Diagnose why a CI run, workflow, job, or attempt failed and get clustered root causes, AI-written explanations, suggested fixes, and evidence log lines.

Instructions

Explain why a Depot CI run, workflow, job, or attempt failed.

Reach for this first whenever someone asks why CI failed, what broke the build, or to fix a failing job. It calls Depot's server-side failure analysis, which clusters every failure in the target by root cause and returns, for each cluster: the error message, an AI-written diagnosis, a suggested fix, and the exact log lines that are the evidence.

Prefer this over depot_get_ci_logs. Depot bounds this response server-side, so it costs far less context than raw logs, and it already works out which job is the real root cause rather than a downstream casualty. Use depot_get_ci_logs afterwards only if you need more detail on a specific attempt.

Pass whichever identifier you have in "id" — a run, workflow, job, or attempt ID. This server works out which kind it is; set "targetType" only when you already know it and want to skip that step.

How to read the returned "state":

  • "focused_failure": one clear culprit. Read representativeAttempts.

  • "grouped_failures": several distinct root causes, clustered by fingerprint. Read failureGroups.

  • "over_limit": too many failures to analyse at this level. narrowerTargets gives the IDs to call this tool again with.

  • "empty": Depot found no failure evidence. The target may still be running, may have succeeded, or may be old enough that its logs have aged out.

Diagnoses and suggested fixes are generated by Depot's AI and can be wrong — treat them as a lead to verify, not a fact. Read-only: this never retries, cancels, or triggers anything.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesA Depot CI identifier: a run, workflow, job, or attempt ID. Pass whatever you have — the server resolves which kind it is.
targetTypeNoWhat kind of thing "id" refers to. Omit unless you know it; the server otherwise infers it, falling back to trying each kind in turn.
maxEvidenceLinesNoCap on evidence log lines per failing attempt. Set 0 to get diagnoses and fixes without any log lines.
maxFailureGroupsNoCap on how many clustered root causes to return. Raise only if 5 was not enough.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateYesOne of focused_failure, grouped_failures, over_limit, empty, or unknown.
targetYes
contextYes
nextStepsYesDepot's suggested follow-ups, rewritten as calls to this server's tools.
truncationYes
emptyReasonNo
aiDisclosureNo
failureGroupsYes
contentWarningYesReminder that names, log lines, and diagnoses here are unverified CI output.
narrowerTargetsYesPresent when state is over_limit: narrower ids to re-run this tool against.
resolvedTargetTypeYesThe target kind that Depot accepted for this id.
representativeAttemptsYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already provide readOnlyHint and idempotentHint, and the description reinforces this with "Read-only: this never retries, cancels, or triggers anything." It also discloses that diagnoses are AI-generated and can be wrong, and explains the server-side bounding behavior that limits context cost.

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 description is structured into clearly labeled sections: purpose, when to use, parameter guidance, how to read the returned state, and a caution about AI-generated content. Every paragraph earns its place and the most important guidance is front-loaded.

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 an output schema present, the description correctly focuses on interpretation rather than raw return format. It explains all meaningful states, gives actionable guidance for each, names the sibling tool to use afterward, and warns about reliability. Nothing essential is missing for correct invocation and response interpretation.

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 description coverage is 100%, so the baseline is 3. The description adds meaningful guidance beyond the schema by explaining that "id" accepts any identifier kind and the server resolves it, and that "targetType" is only needed to skip inference. This is valuable semantic context not present in the schema alone.

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?

The description opens with a specific verb and resource: "Explain why a Depot CI run, workflow, job, or attempt failed." It clearly distinguishes this diagnostic tool from log retrieval and other CI tools by emphasizing root-cause analysis over raw logs.

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?

It explicitly says "Reach for this first whenever someone asks why CI failed" and names the alternative with a clear preference rule: "Prefer this over depot_get_ci_logs" and use logs only for more detail on a specific attempt. This leaves no ambiguity about when to choose this tool.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/akshayjain3450/depot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server