Skip to main content
Glama

PR readiness

pr_readiness
Read-onlyIdempotent

Verifies a GitHub pull request is ready to merge using live data, returning a verdict with blocking reasons, owner, commit SHA, and timestamp.

Instructions

Check whether a GitHub pull request is verified ready to merge, from live GitHub data.

Call it before you say a PR is ready, green, mergeable or done; after every push; and again immediately before any final claim. Pass expected_head_sha = the full sha from git rev-parse HEAD after your push.

verdict: ready | not_ready | merged | closed. ready means GitHub's merge state is CLEAN, every check on the head passed, no review decision blocks, the PR is not queued, and the head is the one you expected. Stricter than the merge button: an optional failing or running check also blocks. not_ready means not verified ready; reasons say why.

Each reason has a code, an owner, a detail and a fix. The codes mergeable_unknown, checks_missing, stale_head and unsupported_merge_state mean "cannot verify yet": report them as that, not as a defect. Every other code is a known obstacle, checks_pending and blocked_by_branch_rule included. owner (author | reviewer | wait | unknown) says whose move it is; it is not permission to act and not a claim that anything else is clear.

This tool reads; it never merges, publishes a draft, pushes or rewrites history, and its verdict does not authorise you to. Ready, green, merged and done are different words: use the one the verdict supports, with head_sha and checked_at.

Errors come back as isError with JSON text {code, message, retryable, retry_after_seconds?}.

Example: {"pr": "octo-org/widgets#42", "expected_head_sha": "4f1c2e7a9b0d3c6e8f1a2b4c5d6e7f8091a2b3c4"}

Input Schema

NameRequiredDescriptionDefault
prYesThe pull request: "owner/repo#42" or "https://github.com/owner/repo/pull/42". GitHub.com only.
expected_head_shaNoThe full 40-character sha you expect at the PR head: run `git rev-parse HEAD` after your push. If the PR head differs, the verdict is not_ready with stale_head.

Output Schema

NameRequiredDescriptionDefault
prYesThe canonical PR URL.
factsYes
reasonsYesEvery reason the PR is not verified ready. Empty when ready, merged or closed.
verdictYesready only when reasons is empty. not_ready means not verified ready; reasons say why.
head_shaYesThe PR head commit this verdict is for.
checked_atYesWhen GitHub was read (ISO 8601). An observation, not a lease.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the readOnly/destructive annotations: it defines the four verdict values and their exact preconditions, discloses that the tool is 'Stricter than the merge button' (optional failing/running checks also block), and classifies which reason codes mean 'cannot verify yet' versus genuine obstacles. It also states the negative capability boundary ('never merges, publishes a draft, pushes or rewrites history') and the error envelope shape {code, message, retryable, retry_after_seconds?}.

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 a single-sentence purpose, then ordered as when-to-use, verdict semantics, reason codes, safety boundary, errors, example — a sensible reading order. It is dense and somewhat long, and lines like 'Ready, green, merged and done are different words' shade into coaching, but each block carries operational weight.

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 two-parameter verification tool with an output schema, virtually nothing an agent needs is missing: verdict meanings, blocking conditions, reason-code taxonomy, owner semantics, error format, and a concrete call example. Even though an output schema exists, the verdict vocabulary is explained in prose where it matters most.

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 baseline is 3; the description earns an increment by tying the sha parameter to a concrete workflow (pass the full sha from `git rev-parse HEAD` after your push) and surfacing the stale_head consequence in the verdict vocabulary. Much of this duplicates the schema's own field descriptions, so it is reinforcement rather than new information.

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 ('Check whether a GitHub pull request is verified ready to merge') and adds the source qualifier 'from live GitHub data', which signals freshness rather than cached state. An agent knows exactly what it gets back — a verification verdict, not a generic PR fetch.

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?

Explicit invocation timing is given three ways: 'before you say a PR is ready, green, mergeable or done', 'after every push', and 'again immediately before any final claim'. It also names the alternative behaviour it replaces (asserting readiness without verification) and specifies the expected_head_sha workflow with `git rev-parse HEAD`.

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

Deploy Server

Other Tools