Skip to main content
Glama

Get pull request review eligibility

gh_get_pr_review_eligibility
Read-onlyIdempotent

Check whether a pull request is eligible for an independent APPROVED review or a COMMENTED review by verifying the author, GitHub and reviewer identities, and exact HEAD SHA. Performs no write and creates no token.

Instructions

Read-only exact-head preflight: report the pull-request author, ordinary GitHub identity, configured reviewer identity, and whether an independent APPROVED review or ordinary COMMENTED review is currently eligible. This advisory call performs no review write and never mints a reviewer installation token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesCanonical GitHub repository name without path separators.
ownerYesCanonical GitHub repository owner.
numberYesPositive pull request number.
expected_head_shaYesExact pull-request head SHA whose review eligibility is requested.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYes
reasonYes
warningNo
reviewer_kindNo
ordinary_loginNo
reviewer_loginNo
pr_author_loginNo
current_head_shaYes
approval_eligibleYes
expected_head_shaYes
head_matches_expectedYes
comment_review_availableYes
Behavior5/5

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

Annotations already declare readOnlyHint and destructiveHint false, but the description adds valuable behavioral context: 'performs no review write and never mints a reviewer installation token.' It also specifies the 'exact-head' constraint and 'advisory' nature, going beyond what annotations convey about token and side-effect behavior.

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?

The description is two sentences, with the key phrase 'Read-only exact-head preflight' front-loaded. Every clause adds either functional output details or explicit non-behavior, with no filler or redundant repetition of the tool name.

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?

Given the tool's moderate complexity and the presence of an output schema, the description sufficiently covers the return entities (author, identities, eligibility flags) and the key constraints (read-only, no token minting, exact SHA). It explains what to expect and what not to expect, making it complete without needing to detail output schemas or pagination.

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 all four parameters. The description reinforces the importance of expected_head_sha via 'exact-head preflight', but this does not add new parameter-level meaning beyond what the schema already states. Hence, the baseline score of 3 is appropriate.

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?

The description uses the specific verb "report" with a clear resource: pull-request review eligibility. It enumerates the exact outputs (author, ordinary GitHub identity, configured reviewer identity, eligibility of APPROVED/COMMENTED reviews), distinguishing it from sibling tools like gh_get_pr_review_state or gh_approve_pr by emphasizing it is a read-only preflight that performs no writes.

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 description clearly frames this as a "preflight" advisory call, implying it should be used before attempting a review write. It does not explicitly name alternative tools (e.g., 'use gh_approve_pr to approve'), but the read-only advisory nature provides strong contextual guidance, so it misses the highest bar only for lacking explicit exclusions or alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fvanevski/gh_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server