Skip to main content
Glama

Post pull request review

post_review_comment

Posts GitHub pull request reviews with an overall summary and optional inline diff comments, validating all comment targets before posting and supporting dry-run previews.

Instructions

Post a review on a pull request: an overall summary plus optional inline comments on specific lines. Inline comments must target lines in the PR's diff (RIGHT = new version, LEFT = removed lines); they're all checked first, and nothing is posted if any is invalid. Defaults to a neutral COMMENT review. Use dryRun to preview. Requires a GITHUB_TOKEN that can write to pull requests. Only post when the user has asked you to.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>",
      "pullNumber": "<pullNumber>",
      "body": "<body>"
    },
    "name": "post_review_comment"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesOverall review summary, in Markdown
repoYesRepository name, e.g. 'next.js'
eventNoCOMMENT (default) leaves feedback without a verdict; REQUEST_CHANGES and APPROVE set the review statusCOMMENT
ownerYesRepository owner (user or org), e.g. 'vercel'
dryRunNoValidate and preview the review without posting it
commentsNoInline comments; each line must be part of the PR's diff
pullNumberYesPull request number

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing an all-or-nothing validation rule ('they're all checked first, and nothing is posted if any is invalid'), the default review event, and the auth requirement ('Requires a GITHUB_TOKEN that can write to pull requests'). The annotations only declare it is a non-read-only, non-idempotent, open-world write; the description supplies the actual write semantics.

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?

Front-loads what the tool does, then packs the diff constraint, validation behavior, defaults, auth, and the usage gate into a few dense sentences with no filler. Every sentence carries operational information.

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?

For a 7-parameter mutation with no output schema, the description covers validation behavior, auth, defaults, preview mode, and the posting gate. The only meaningful omission is what a successful call returns (review id/URL) and whether re-posting creates duplicate reviews, given idempotentHint=false.

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 every parameter including event, dryRun, side, and line is already documented. The description reinforces the diff-line constraint and the neutral COMMENT default but adds no syntax or format detail beyond the schema, so the baseline of 3 applies.

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 ('Post a review on a pull request') and immediately scopes it to 'an overall summary plus optional inline comments on specific lines'. That distinguishes it clearly from the read-only siblings (get_pr_diff, summarize_pr, check_pr_risk) without needing to name them.

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?

Gives an explicit when-not gate ('Only post when the user has asked you to') and a preview pathway ('Use dryRun to preview'), which is strong usage guidance. It stops short of naming an alternative action path, e.g. fetching the diff first to confirm line numbers, so it is not fully exhaustive.

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