Skip to main content
Glama

Get a pull request

get_pull_request
Read-only

Retrieves a specific pull request by number from a repository, including body, merge metadata, reviewers, comment counts, and head SHA for CI workflow lookups.

Instructions

Get one pull request by number from a repository (owner/repo/index): list_pull_requests' fields plus body, merged_by, merge_commit_sha, merge_base, assignees, requested_reviewers, milestone, comment counts and diff_url. head_sha is what list_workflow_runs takes to find its CI. For the changes themselves use list_pull_request_files or get_pull_request_diff.

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name.
indexYesIssue or pull-request number.
ownerYesRepository owner — user or organization.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.22.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, openWorldHint=true), and with no output schema the description usefully enumerates the payoff fields it returns (body, merged_by, merge_commit_sha, comment counts, diff_url), which is real added context. Gap: no mention of not-found behavior, rate limits, or pagination/truncation for body/diff fields.

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 action, then payoff, then alternatives — good ordering with no filler sentences. The middle field enumeration is dense and slightly run-on, but it earns its place because there is no output schema to carry that information.

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?

For a 3-param read tool with no output schema, the description covers what it does, what comes back, how it differs from list_pull_requests, where head_sha flows next, and which siblings to use for file/diff data. Nothing an agent needs to invoke it correctly is missing.

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 coverage is 100% with per-param descriptions ('Issue or pull-request number', 'Repository owner — user or organization'), so the schema does the heavy lifting. The description's '(owner/repo/index)' ordering restates the schema keys without adding format or edge-case guidance (e.g., is index repo-scoped or global; does index accept an issue number that is actually a PR).

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?

Specific verb+resource+scope: 'Get one pull request by number from a repository (owner/repo/index)'. It explicitly contrasts itself with list_pull_requests ('list_pull_requests' fields plus body, merged_by...'), so an agent knows this is the singular, richer variant without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names alternatives and the condition that selects them: 'For the changes themselves use list_pull_request_files or get_pull_request_diff.' It also routes downstream: 'head_sha is what list_workflow_runs takes to find its CI', giving an explicit hand-off rule rather than leaving composition to inference.

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