Skip to main content
Glama

Get merged pull requests

get-merged-pull-requests-tool
Read-onlyIdempotent

Count merged pull requests over a recent window (default 30 days), with a human-vs-bot split so you can answer "including dependabot" and "excluding dependabot" from the same result. Returns the total plus per-repository and per-author breakdowns. Optionally scope to specific "owner/name" repositories (e.g. patchstack/saas). Use this when the user asks how many PRs were merged, shipped, or closed on a repo or across the team — including bot/dependabot PRs.

Input Schema

NameRequiredDescriptionDefault
daysNoLook-back window in days. Defaults to 30.
include_botsNoWhether to include bot/dependabot PRs in the totals. Defaults to true; the result always reports the human-vs-bot split regardless.
repositoriesNoOptional list of "owner/name" repository slugs to scope to (e.g. ["patchstack/saas"]). A bare repo name like "saas" also matches. Omit to include every repository on the team.

Output Schema

NameRequiredDescriptionDefault
daysYesLook-back window used, in days.
teamYesTeam name.
sinceYesISO-8601 start of the window.
untilYesISO-8601 end of the window.
authorsYesPer-author merged counts with an is_bot flag.
bot_mergedYesMerged PRs authored by bots (any "[bot]" login).
human_mergedYesMerged PRs authored by humans.
repositoriesYesRepository slugs included in the result.
total_mergedYesTotal merged PRs in the window (respects include_bots).
dependabot_mergedYesMerged PRs authored by dependabot specifically.
repositories_breakdownYesPer-repository totals with human/bot split.
unmatched_repositoriesYesRequested slugs that did not match a team repository.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly and idempotent, so the safety profile is covered; the description adds real behavioral context by disclosing the return shape (total plus per-repository and per-author breakdowns) and the key nuance that the human-vs-bot split is always reported regardless of include_bots. It does not mention pagination or limits, but for an aggregate count that is a minor gap.

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 the core action and window, then the return shape, then the trigger sentence. Four sentences with little waste, though the bot/dependabot point is stated twice (in the split explanation and again at the end).

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 low-complexity, zero-required-parameter read tool with an output schema and safe annotations, the description covers what to call it for, the defaults, and the shape of results. The main missing piece is which sibling to choose for adjacent PR questions, which is left implicit.

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 coverage is 100%, so the baseline is 3, but the description adds meaning beyond the schema by explaining that the bot split lets you answer both 'including' and 'excluding dependabot' from a single call, and by restating the owner/name scoping with a concrete example. It does not clarify day-range bounds or caps on the repositories list.

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?

States a specific verb and resource with scope: 'Count merged pull requests over a recent window (default 30 days)'. The 'merged' qualifier inherently separates it from siblings like get-created-pull-requests-tool and get-open-pull-requests-tool, though it never names them. Slight ambiguity from lumping 'merged, shipped, or closed' together, which are not strictly the same event.

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?

Gives a clear trigger condition: 'Use this when the user asks how many PRs were merged, shipped, or closed on a repo or across the team — including bot/dependabot PRs.' No explicit exclusions or named alternatives (e.g. get-pull-request-metrics-tool, get-open-pull-requests-tool) are offered for adjacent questions.

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