Skip to main content
Glama

Get open pull requests

get-open-pull-requests-tool
Read-onlyIdempotent

List the team's open pull requests grouped by author, with the signal that shows what is blocking each one: whether it is awaiting a reviewer, has changes requested, is approved and ready to merge, is still a draft, is failing CI checks, or is simply too large for anyone to review. Optionally scope to specific "owner/name" repositories (e.g. patchstack/hub). Use this to nudge people to merge — lead with the headline. Human authors include their oldest open PRs with age; bot authors (dependabot etc.) are collapsed into count-only summaries so a dependency backlog cannot drown out the PRs a person should act on.

total_oversized and the per-PR oversized flag mark pull requests past the hard review limits — over 100 files, over 5,000 added or deleted lines, or over 8,000 changed in total. These are the ones a reviewer cannot pick up at all, so they are named in the headline and sorted to the front of their author's list. Report them as blocked on being split, not as blocked on a reviewer. The threshold is deliberately the hard limit rather than the team's line target: an open PR gives no file list, so the test/docs discount assess-change-fit-tool applies to a numstat cannot be applied here, and judging against the target would flag changes that check would have passed. size.category is unknown when the counts were never recorded — that is missing data, not a small pull request; do not describe it as small.

Set include_bot_details when you are working the dependency queue itself — merging dependabot PRs, chasing failing bumps — and each bot author gains the PR numbers, repositories, titles and URLs you need to act, ordered by what can be closed out first: ready to merge, then failing checks, then oldest.

Check status_freshness before quoting counts: it flags open PRs whose local status may be stale, and repositories that have not synced pull requests recently — whose PRs may be missing from these counts altogether. Archived (decommissioned) repositories are excluded — this is a review queue, and their PRs are nobody's to review.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get-open-pull-requests-tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
repositoriesNoOptional list of "owner/name" repository slugs to scope to (e.g. ["patchstack/hub", "patchstack/saas"]). Omit to include every active repository on the team.
include_bot_detailsNoInclude the individual PRs for bot authors (dependabot etc.) instead of counts alone — numbers, repositories, titles and URLs, ordered ready-to-merge first, then failing checks, then oldest. Set this when you are working the dependency queue itself; leave it off when summarising a review queue for people.

Output Schema

NameRequiredDescriptionDefault
botsYesPer bot author: total, awaiting_review, ready_to_merge, failing_checks — plus pull_requests (capped, actionable first) and more_not_shown when include_bot_details was set.
teamYesTeam name.
authorsYesPer human author: totals plus awaiting_review, changes_requested, ready_to_merge, draft, failing_checks, oversized, their open PRs (capped, oversized first then oldest, each with opened_at/days_open, an oversized flag and a size block of additions/deletions/changed_files/category), and more_not_shown.
bot_openYesOpen PRs authored by bots (dependabot etc.).
headlineYesOne-line human/bot summary to lead with when relaying this result.
human_openYesOpen PRs authored by people.
total_openYesTotal open PRs across the included repositories, bots included.
repositoriesYesRepository slugs included in the result.
total_oversizedYesHuman-authored open PRs past the hard review limits (over 100 files, over 5,000 added or deleted lines, or over 8,000 changed). Blocked on being split, not on a reviewer.
status_freshnessYesHow wrong these counts could be, in both directions. possibly_stale counts open PRs with no status sync or activity in over 30 days (some may already be closed, so counts are an upper bound); repositories_awaiting_sync names active repositories whose PRs have not synced in that time (PRs there may be missing, so counts are a lower bound). note spells out whichever applies, and is null only when neither does.
total_awaiting_reviewYesTotal open PRs blocking on a reviewer, bots included.
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. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, and the description goes well beyond them: bot authors collapsed to counts unless opted in, archived repositories excluded, stale-status and un-synced-repository caveats via status_freshness, and the precise oversized thresholds with the reasoning for choosing the hard limit over the line target. It does not describe pagination or result ordering for human authors beyond oversized-first, so not quite exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first sentence, but the body runs to five dense paragraphs, and the include_bot_details paragraph largely restates the schema description of that parameter verbatim. The oversized-threshold discussion is useful for reading results but is long and sits ahead of the shorter, more operationally important status_freshness warning.

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 tool with an output schema and full parameter coverage, the description covers the non-obvious traps: bots drowning out human PRs, oversized PRs misreported as reviewer-blocked, unknown size categories misread as small, and stale or un-synced data. Minor gaps remain around headline contents and human-author ordering, but nothing critical to correct invocation is missing.

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 real meaning: the semantics of the oversized flag and total_oversized, the meaning of size.category = unknown (missing data, not small), the exact bot-detail ordering (ready to merge, then failing checks, then oldest), and that repositories scopes to active repos with archived excluded. It adds interpretation beyond the schema's restatement of the same parameters.

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?

States a specific verb and resource — list the team's open pull requests grouped by author — plus the blocking signals it surfaces (awaiting reviewer, changes requested, approved, draft, failing CI, oversized) and an optional repository scope. An agent can distinguish this from get-created-pull-requests-tool or get-merged-pull-requests-tool from the description alone.

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 concrete use case ("Use this to nudge people to merge — lead with the headline") and an explicit conditional for include_bot_details: on when working the dependency queue, off when summarising a review queue for people. It lacks any explicit steering to a sibling tool for the adjacent cases (e.g. created vs merged PRs), so it stops 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