Skip to main content
Glama

List a repository's GitHub pull requests

list_pull_requests

List a repository's pull requests newest first through GitHub CLI so you can select one to start a PR review; requires an authenticated gh.

Instructions

Lists the pull requests of a repository through the GitHub CLI, newest first, so you can pick one to review with start_review(mode="pr", pr=NUMBER). Requires an authenticated gh.

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": "list_pull_requests"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoNoowner/repo when the PRs live in another repository than the checkout.
limitNoMaximum entries. Default 20.
stateNoWhich PRs to list: open (default), closed, merged or all.
repoPathNoRepository path. Defaults to the current working directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the auth prerequisite ("Requires an authenticated gh") and the newest-first ordering, but says nothing about network failure behavior, pagination beyond the limit param, or what happens when the repo cannot be resolved.

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?

A single tightly constructed sentence with the capability front-loaded and the prerequisite appended last; no filler and no repetition of schema fields.

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 four-parameter, zero-required read tool with full schema coverage and no output schema, the description covers purpose, ordering, auth need, and next-step routing. Only the shape of returned data is left implicit, a minor gap without an output schema.

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 four parameters (repo, limit, state, repoPath) are already documented with defaults and an enum. The description adds no syntax or format detail beyond that, which is the baseline case.

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 ("Lists the pull requests of a repository"), adds ordering ("newest first") and the underlying mechanism (GitHub CLI), and distinguishes itself from start_review by naming it as the downstream consumer of a PR number.

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 purpose clause "so you can pick one to review with start_review(mode=\"pr\", pr=NUMBER)" gives a clear when-to-use context and even shows the follow-up call signature. It stops short of explicit exclusions or alternatives such as list_review_scope.

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