Skip to main content
Glama

Find delivery bottleneck

find-delivery-bottleneck-tool
Read-onlyIdempotent

Where does a change spend its waiting time — in the backlog, being written, before review, in review, or after merge? Splits the path from "somebody asked for this" to "shipped to production" into six stages — sitting in the backlog, being written on a branch, waiting for a first review, in review, merged and waiting for a deploy, and the deploy itself running — times each one across recently merged pull requests, and names the single slowest stage with the pull requests that prove it and one intervention to try.

Use this to answer "why is our delivery slow" with one stage instead of five dashboards. The interventions differ completely by stage: chasing reviewers does nothing when the wait is after merge.

A stage is only named as the bottleneck when it was measurable on enough of the window's work. A stage that could barely be seen is still reported, with the reason it is ineligible — so missing deployment tracking reads as missing deployment tracking rather than as a fast deploy. Bot pull requests are excluded. Review history is pruned after 90 days, so the window is clamped there.

The backlog stage is measured and reported but never named as the bottleneck: it is the gap before anybody started rather than a change waiting to move, it dwarfs the delivery stages wherever a tracker is connected, and it answers to prioritisation instead. It is timed from the linked Jira or Linear issue.

The two deploy stages are scored only against repositories that have ever recorded a production deployment, because a package or a docs site never deploys and counting its merged work as untracked buries the repositories that do. Each stage carries its own analysed count for that reason; the repositories left out are named in the blind spots.

A stage that is blank because nothing is connected to time it carries an unlock string — a tracker for the backlog, a named production environment or deploy reporting for the two deploy stages — with the full ask in its note. Relay that as something to connect and what it would reveal, never as a stage with no wait in it: the changes did reach production, and how long that took is the part nothing can see.

Input Schema

NameRequiredDescriptionDefault
window_daysNoHow many days of merged pull requests to time. Defaults to 30, clamped to 1–90 because review history is pruned after 90 days.
repositoriesNoOptional "owner/name" repository slugs to scope to. Leave empty for every active repository the team ships to. Scoping to one representative repository makes the result easier to interpret with a team.

Output Schema

NameRequiredDescriptionDefault
teamYesTeam name.
periodYesThe window actually measured: ISO start, ISO end, and its span in days.
stagesYesAll six stages — waiting_to_start, writing_the_change, waiting_for_review, in_review, waiting_to_deploy, deploy_running — each with median/p75 hours, sample size, the count it was scored against (`analysed`, which for the two deploy stages counts only repositories that deploy), coverage, whether it is eligible to be ranked, whether it competes for the bottleneck at all (`ranked`, false for waiting_to_start), how many changes merged with no review from anyone but their author and so never entered the stage (`skipped`, review stages only — a skipped change did something, it is not missing data), what would have to be connected to see it (`unlock`), and a note saying why it cannot or will not be ranked.
headlineYesOne-line answer to lead with when relaying this result.
bottleneckNoThe single slowest eligible stage: median and p75 hours, sample size, coverage, one intervention to try, and the three slowest pull requests as evidence. Null when no stage was measurable on enough of the window — read the stage notes for what is missing.
blind_spotsYesWhat these numbers cannot see. Relay these alongside the finding; the failure mode of this diagnostic is a confident reading of a gap in the data.
repositoriesYesRepository slugs included in the result.
contributing_factorsYesPatterns that make the slowest stage slower — review concentration, oversized changes, current queue pressure, work merging without a recorded review. Reported, never ranked.
pull_requests_analysedYesHuman-authored pull requests merged in the window.
unmatched_repositoriesYesRequested slugs that did not match an active team repository — either not tracked, or archived.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / stages / description
      Previous value: -"All six stages — waiting_to_start, writing_the_change, waiting_for_review, in_review, waiting_to_deploy, deploy_running — each with median/p75 hours, sample size, the count it was scored against (`analysed`, which for the two deploy stages counts only repositories that deploy), coverage, whether it is eligible to be ranked, whether it competes for the bottleneck at all (`ranked`, false for waiting_to_start), what would have to be connected to see it (`unlock`), and a note saying why it cannot or will not be ranked."New value: +"All six stages — waiting_to_start, writing_the_change, waiting_for_review, in_review, waiting_to_deploy, deploy_running — each with median/p75 hours, sample size, the count it was scored against (`analysed`, which for the two deploy stages counts only repositories that deploy), coverage, whether it is eligible to be ranked, whether it competes for the bottleneck at all (`ranked`, false for waiting_to_start), how many changes merged with no review from anyone but their author and so never entered the stage (`skipped`, review stages only — a skipped change did something, it is not missing data), what would have to be connected to see it (`unlock`), and a note saying why it cannot or will not be ranked."
  2. Changed1 schema field changed
    • changedOutput schema / properties / stages / description
      Previous value: -"All four stages — waiting_for_review, in_review, waiting_to_deploy, deploy_running — each with median/p75 hours, sample size, the count it was scored against (`analysed`, which for the two deploy stages counts only repositories that deploy), coverage, whether it is eligible to be ranked, and a note saying why not when it is not."New value: +"All six stages — waiting_to_start, writing_the_change, waiting_for_review, in_review, waiting_to_deploy, deploy_running — each with median/p75 hours, sample size, the count it was scored against (`analysed`, which for the two deploy stages counts only repositories that deploy), coverage, whether it is eligible to be ranked, whether it competes for the bottleneck at all (`ranked`, false for waiting_to_start), what would have to be connected to see it (`unlock`), and a note saying why it cannot or will not be ranked."
  3. Changed1 schema field changed
    • changedOutput schema / properties / stages / description
      Previous value: -"All four stages — waiting_for_review, in_review, waiting_to_deploy, deploy_running — each with median/p75 hours, sample size, coverage, whether it is eligible to be ranked, and a note saying why not when it is not."New value: +"All four stages — waiting_for_review, in_review, waiting_to_deploy, deploy_running — each with median/p75 hours, sample size, the count it was scored against (`analysed`, which for the two deploy stages counts only repositories that deploy), coverage, whether it is eligible to be ranked, and a note saying why not when it is not."
  4. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly and idempotent annotations, the description discloses extensive behavior: six timed stages, eligibility rules for naming a bottleneck, bot PR exclusion, 90-day review-history clamping, backlog treatment, deploy-stage repository scoping, blind spots, and unlock strings for missing data. These are exactly the operational caveats an agent needs to interpret results correctly.

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 front-loaded with the core question and stage model, and each paragraph addresses a distinct behavioral caveat. It is long and somewhat verbose for a tool definition, but the length is largely justified by the complexity of the analysis and the edge cases being disclosed.

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?

Given the tool's analytical complexity and the presence of an output schema, the description is complete enough for correct invocation and interpretation. It covers what stages exist, how bottlenecks are chosen, what is excluded, how missing data appears, and how to relay unlock guidance.

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 both window_days and repositories are already documented in the input schema. The description largely reinforces the schema by mentioning the 90-day clamp and the interpretability of scoping to a representative repository, but adds little parameter-level detail beyond what is structured.

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 states a specific analytical purpose: splitting the path from request to production into six stages, timing each across recently merged pull requests, and naming the single slowest stage with supporting PRs and an intervention. It distinguishes itself from dashboard-style alternatives by framing the result as 'one stage instead of five dashboards.'

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?

It clearly says to use this tool to answer 'why is our delivery slow' and explains that stage-specific interventions differ, which helps an agent understand the intended context. It does not explicitly name sibling alternatives such as get-dora-metrics or get-pull-request-metrics or state when not to use this tool, so it falls short of full alternative routing.

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