Skip to main content
Glama

Approve pull request at exact head

gh_approve_pr

Approve a pull request by submitting a formal GitHub review, but only after verifying the exact head SHA and reviewer login. Ensures the approval comes from an independent reviewer, not the PR author.

Instructions

Additive write: submit exactly one formal GitHub APPROVED review for the supplied exact pull-request head through the server-configured independent reviewer principal. Before the review POST the server verifies repository write policy, current head, expected reviewer login, authenticated reviewer login, and reviewer != PR author. The caller cannot select credentials. The write is attempted once and immutable review-ID readback verifies APPROVED state, actor, head, and body. It never comments as a fallback, merges, dismisses reviews, or retries an ambiguous mutation automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoOptional Markdown body for the APPROVED review.
repoYesGitHub repository name without the owner prefix.
ownerYesGitHub repository owner or organization login.
numberYesPull request number to approve.
expected_head_shaYesExact pull-request head SHA that was independently reviewed.
expected_reviewer_loginYesExact reviewer actor login expected from the server-configured reviewer principal. This is a compare-only precondition and never selects credentials.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
bodyYes
stateYes
actionNoapprove
authorNo
numberYes
messageYes
warningNo
review_idYes
commit_shaYes
request_idNo
submitted_atNo
write_completedYes
readback_completedYes
precondition_checkedYes
state_matches_requestedYes
Behavior5/5

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

Even with annotations present, the description adds substantial behavioral context: it is additive, caller cannot select credentials, the server verifies multiple preconditions, the write is attempted once, and an immutable review-ID readback verifies APPROVED state, actor, head, and body. It also explicitly rules out fallback comments, merges, dismissals, and ambiguous retries.

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 dense but every sentence adds necessary behavioral or safety information. It is front-loaded with the core action and then systematically covers preconditions, credential handling, verification, and non-behaviors without 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 write operation with moderate complexity, the description covers purpose, preconditions, side effects, failure semantics, actor constraints, and verification. With an output schema available and rich annotations, no significant contextual gap remains.

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?

The input schema already provides 100% parameter coverage with clear descriptions, so the baseline applies. The description reinforces the meaning of expected_head_sha and expected_reviewer_login, but it does not add significant parameter-specific meaning beyond what the schema already states.

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 states a specific action: submit exactly one formal GitHub APPROVED review at a supplied exact pull-request head. It is clearly distinguished from sibling tools by explicitly saying it never comments as a fallback, merges, or dismisses reviews.

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 makes its use case clear by emphasizing approval at an exact head and requiring an expected reviewer login. It also implicitly excludes fallback behaviors such as commenting or merging, but it does not explicitly name alternative tools like gh_request_pr_changes or gh_comment_pr_review.

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