Skip to main content
Glama

Review a GitHub pull request

github_pr_review

Posts approve, request-changes, or comment reviews on GitHub pull requests, including line comments, with optional head SHA to prevent posting on outdated commits.

Instructions

Post a review on a pull request: approve to approve changes, request_changes to request revisions (body required), or comment for general feedback. Only an open pull request can be approved or have changes requested, and GitHub does not let an author approve their own pull request or request changes on it. Line comments can be attached: path and line in the new version (or side left for a removed line), and start_line for a multi-line range. Pass head_sha to ensure the review posts only on the commit that was reviewed; if new commits arrived, the call fails without posting. A pull request is 12, #12, owner/repo#12 or its URL; a bare number means the working tree's repository, or repo.

Input Schema

NameRequiredDescriptionDefault
prYesThe pull request, as 12, #12, owner/repo#12 or its URL.
bodyNoThe review text. Required for request_changes and for comment without line comments; optional for approve.
repoNoowner/name; defaults to the working tree's repository (its origin). Used for a bare number.
eventYesThe review action: approve, request_changes, or comment.
commentsNoOptional array of up to 50 line comments.
head_shaNoOptional 40-character commit SHA the review was based on. Fails if new commits arrived.

Output Schema

NameRequiredDescriptionDefault
prYes
repoYes
reviewYes
foreignYes
commentsYesHow many line comments were posted with the review.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already disclose the mutation profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=true), and the description adds real value on top: open-PR and self-approval restrictions, the head_sha optimistic-concurrency guard that fails without posting, and body being required for request_changes. It does not say whether a posted review can be edited or dismissed afterward, which is the main remaining behavioral gap for a non-idempotent write.

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?

Information is front-loaded: the action enum comes first, then preconditions, then line-comment and concurrency details, then the PR reference format. The middle sentences are dense run-ons, but every sentence carries operational content rather than filler.

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 6-parameter write tool, the description covers what an agent needs before calling: valid PR reference forms, repo defaulting, per-event body requirements, line-comment addressing, and the failure mode of head_sha. With annotations and an output schema also present, nothing important is left unspecified.

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%, so the schema already documents pr formats, body requirements, comments fields (path/line/side/start_line) and head_sha failure behavior. The description largely restates those rules in prose, adding only the mild clarification that side=left targets a removed line and start_line defines a multi-line range — useful but duplicative of the schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ("Post a review on a pull request") and immediately enumerates the three review actions, which distinguishes a review from a plain PR comment. It never names github_pr_comment or github_pr_review's other siblings, so the differentiation is inferred from the event enum rather than stated.

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?

It gives clear conditions for each event value (approve vs request_changes vs comment) and hard preconditions — the PR must be open, and an author cannot approve or request changes on their own PR. It stops short of explicitly routing the agent to alternatives such as github_pr_comment for non-review feedback or github_pr_merge for merging.

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