Skip to main content
Glama

analyze_repo

Run a CI health check on a GitHub repo. It lints workflows, analyzes run history for flaky jobs and wasted spend, checks caches/artifacts, and gives a 0-100 score with ranked dollar-quantified fixes.

Instructions

Full CI health report for a GitHub repository: static workflow lint, run-history analysis (success/failure rates, flaky jobs, retry waste, superseded PR runs, queue times, duration trends, zombie crons, PR feedback time), cache and artifact checkups, a 0-100 health score, and a ranked, dollar-quantified top-wins list. Makes ~100+ GitHub API calls and typically takes 10-30 seconds. Optionally set flaky_logs to also read N flaky-failure job logs and name the flaky tests (needs a token), or cache_logs to measure the real cache hit rate from N job logs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesRepository as owner/name, e.g. cli/cli
runsNoNumber of recent runs to sample (default 100)
workflowNoScope the history analysis to one workflow (file name like ci.yml, or display name); no health score in scoped mode
cache_logsNoSample N job logs to measure the real cache hit/miss rate (1 API request per log; needs a token)
flaky_logsNoRead N flaky-failure job logs to name the flaky tests (1 API request per log; needs a token)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description itself discloses important behavioral traits: it makes ~100+ GitHub API calls, typically takes 10-30 seconds, and optional log-reading modes require a token. It stops short of explicitly stating read-only/non-destructive behavior, but the report/analysis framing and API-call disclosure give an agent a realistic execution-cost and auth picture.

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?

The description is dense but information-rich: it front-loads the core purpose, then gives cost/time, then optional parameters. The first sentence is long with many comma-separated features, but no sentence is wasted.

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?

For a complex tool with no output schema and no annotations, it covers the core deliverable, performance cost, optional parameter effects, and token requirements. Missing pieces are explicit guidance on sibling-tool selection and a fuller statement of the return format, but the description is largely self-sufficient.

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%, so all five parameters are already documented. The description's mentions of flaky_logs and cache_logs largely restate the schema ('read N flaky-failure job logs', 'measure the real cache hit rate'), adding no substantial new semantics beyond the baseline.

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 clearly identifies analyze_repo as a full CI health report for one GitHub repository and enumerates concrete outputs (health score, run-history stats, top-wins list). It is clear but doesn't explicitly contrast with sibling tools like lint_repo or run_deep_dive, so it doesn't fully meet the sibling-differentiation bar.

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 tool's purpose is specific enough to imply when it would be used, and the cost note (~100+ API calls, 10-30 seconds) suggests it is for comprehensive analysis rather than quick checks. However, there is no explicit guidance about when to prefer it over lint_repo or run_deep_dive, and no when-not-to-use conditions are stated.

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