Skip to main content
Glama

Get exact-head pull request review state

gh_get_pr_review_state
Read-onlyIdempotent

Check whether a pull request meets review requirements by verifying the expected head SHA and reviewing the review status.

Instructions

Read-only: aggregate bounded review, requested-reviewer, and unresolved-thread evidence only for an exact expected PR head. Head mismatch or partial evidence prevents a definitive satisfied result.

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 state is requested.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYes
warningNo
base_shaYes
requested_teamsNo
review_decisionNo
stale_approvalsNo
current_head_shaYes
reviews_evidenceNo
expected_head_shaYes
exact_head_evidenceYes
requested_reviewersNo
requirements_reasonYes
current_head_commentsNo
head_matches_expectedYes
stale_change_requestsNo
current_head_approvalsNo
requirements_satisfiedNo
review_threads_evidenceNo
unresolved_review_threadsNo
current_head_change_requestsNo
Behavior4/5

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

Annotations already cover read-only, idempotent, and non-destructive behavior. The description adds valuable context beyond annotations: 'Head mismatch or partial evidence prevents a definitive satisfied result' and 'bounded evidence', clarifying the tool's limitations.

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?

One sentence, front-loaded with 'Read-only', efficient and structured. Every word earns its place without repetition or fluff.

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?

The tool has an output schema, so return details are covered there. The description covers the key behavioral nuance (exact head, partial evidence, definitive result) well enough for a tool of moderate complexity.

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 descriptions cover all four parameters (100% coverage), and the description's 'expected PR head' aligns with expected_head_sha but adds no extra meaning. Baseline 3 is appropriate given full schema coverage.

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?

Clear verb 'aggregate' and specific resource: review, requested-reviewer, and unresolved-thread evidence. The qualifier 'only for an exact expected PR head' distinguishes it from generic PR review listing tools like gh_get_pr_reviews or gh_get_pr.

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 clarifies that this is for 'an exact expected PR head' and warns that head mismatch or partial evidence invalidates a definitive result, implying when it's appropriate to use. It does not explicitly name alternative tools, but the context is clear enough.

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