Skip to main content
Glama

github_get_pull_request

Read-only

Why can a pull request not merge? Reads one pull request: state, draft, mergeable and mergeable_state, head and base branch and sha, how far the head is ahead of and behind its base, the base branch's required status checks (classic protection and rulesets) with each one's state on the head (passing, failing, pending, missing, unknown), whether the base requires up-to-date branches, the approving reviews it needs and has, the repository's Ankra merge train (on, off, not_connected) with this pull request's place on it or why it left, and merge when green: a pending request (what it waits on) and whether the repository's binding honours one. blocking_reasons lists only causes these reads establish; unknowns lists what could not be read. Read-only. Call it before saying why a pull request is blocked.

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name. Also accepts the combined 'owner/name' form.
ownerNoRepository owner. May be omitted when the repository name is unambiguous in this organisation, or embedded in 'repo' as 'owner/name'.
pull_request_numberYesThe pull request's number within the repository.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description confirms 'Read-only' consistently. Beyond that it discloses meaningful return semantics not captured elsewhere: blocking_reasons lists only causes the reads establish, and unknowns lists what could not be read, plus merge-train states (on/off/not_connected). It doesn't cover error/permission behavior, so it stops at 4.

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 question hook is well front-loaded, but the body is a single dense run-on sentence listing a dozen return fields, which hurts scannability. Each item earns its place by describing returned content, but the structure should be broken up rather than delivered as one wall of text.

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?

There is no output schema, so the description carries the full burden of explaining return values, and it does so comprehensively for a diagnostic read of a single PR. It omits any note on error/empty cases or permission requirements, but for its stated purpose it is nearly complete.

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 the schema already documents repo, owner, and pull_request_number, including the 'owner/name' form and the unambiguity rule for owner. The description adds no parameter-level detail beyond the concept of operating on a single pull request, so the baseline 3 applies.

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?

Opens with the motivating question ('Why can a pull request not merge?') then states a specific verb and resource: 'Reads one pull request'. It enumerates the exact signal set returned (state, mergeable, mergeable_state, status checks, reviews, merge train), which lets an agent distinguish it from sibling write/merge tools like github_create_pull_request and scm_merge_pull_request without opening a schema.

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?

Explicitly states when to call it: 'Call it before saying why a pull request is blocked.' That is a clear usage context tied to the tool's purpose. However, it names no alternative or exclusion (e.g., how it relates to list_application_pull_request_reviews), so it stops short of full when/when-not guidance.

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