Skip to main content
Glama

pr_deep_dive

Diagnose why a PR's CI is failing or slow by inspecting all workflow runs, wait times, re-run smells, and the latest failed run's job, step, failing tests, and log tail.

Instructions

Diagnose a pull request's CI: every workflow run on the PR's head commit, how long the PR waited for a verdict, re-run smells, and a full deep dive into the latest failed run — failing job and step, named failing tests (30+ frameworks recognized), and the failing step's log tail. The natural first call when someone asks why CI is failing or slow on their PR.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prYesPull request number
repoYesRepository as owner/name
log_tailNoLines of the failing step's log to include per failed job (default 20, 0 = off; needs a token)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.66.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description carries the behavioral transparency burden. It does well by disclosing the diagnostic scope, the inspection of every workflow run, the re-run smell analysis, and the deep dive into the latest failed run. It does not explicitly state read-only intent or auth requirements, but "diagnose" and the output-centric wording make the non-mutating nature reasonably clear.

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 two dense sentences with no filler. The first sentence front-loads the core capability and enumerates the valuable outputs, while the second sentence provides the canonical use case, making every clause earn its place.

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?

With no output schema and no annotations, the description compensates by naming most of the important returned content: workflow runs, verdict wait time, re-run smells, failing job/step, named tests, and log tail. It leaves minor gaps such as behavior when there is no failed run and possible token requirements, but it is strong enough for an agent to select and invoke the tool correctly.

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 description coverage is 100%, and the parameter descriptions already explain repo, pr, and log_tail with defaults and constraints. The tool description does not need to add parameter semantics, and it does not; it only reflects the log-tail concept at a high level. Baseline 3 is appropriate because the schema does the heavy lifting.

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: "Diagnose a pull request's CI," then concretely enumerates what is covered (workflow runs on the head commit, wait time, re-run smells, latest failed run, failing tests, log tail). This clearly distinguishes it from the sibling tools, especially run_deep_dive, by anchoring on the pull request and CI failure/slowness context.

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?

The description gives an explicit trigger condition: "The natural first call when someone asks why CI is failing or slow on their PR." This tells an agent exactly when to choose this tool, though it does not explicitly name alternatives or state when not to use it, so it stops just short of a 5.

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