Skip to main content
Glama

Comment on a GitHub pull request

github_pr_comment

Posts a Markdown comment on a pull request and can upload image or video attachments, notifying followers and keeping the discussion on the PR.

Instructions

Post a comment on a pull request; the people following it are notified and the comment stays on the pull request. Needs write permission on the repository. A pull request is 12, #12, owner/repo#12 or its URL; a bare number means the working tree's repository, or repo. Attachments are images (png, jpg, gif, webp, svg, up to 10 MiB) and videos (mp4, mov, webm, up to 100 MiB), up to 50, uploaded with the text: a body reference like ![alt](./shot.png) becomes the uploaded file and the others are appended; they need gh 2.99 or newer, and a file that fails to upload is listed under errors.attachments while the rest goes through.

Input Schema

NameRequiredDescriptionDefault
prYesThe pull request, as 12, #12, owner/repo#12 or its URL.
bodyYesThe comment, in Markdown.
repoNoowner/name; defaults to the working tree's repository (its origin). Used for a bare number.
attachmentsNoImages and videos to upload with the text.

Output Schema

NameRequiredDescriptionDefault
prYes
urlYesThe new comment's URL.
repoYes
notesYesWhat to know about the result; [] when nothing.
errorsYesFailed steps, keyed by step (fields.<Field name>, blocked_by, kind, labels, milestone); {} when none.
foreignYes
attachmentsYesThe files that were sent; [] when none were given.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (readOnly=false, openWorld=true, idempotent=false), the description discloses real behavioral consequences: followers are notified, the comment persists, write permission is required, uploads require gh 2.99+, and partial failures surface under errors.attachments while the rest of the comment still posts. The attachment size/type/count limits add concrete operational constraints the annotations cannot express.

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?

The action and side effect are front-loaded in the first clause, and the remaining content — permissions, reference formats, attachment rules — is all load-bearing. The second sentence is long and clause-heavy, packing reference syntax and attachment policy into one run, which costs some readability.

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 mutation tool with an output schema and full annotation coverage, the description supplies everything an agent needs: authorization requirement, notification side effect, all accepted PR reference forms, repo resolution default, upload constraints, tooling version, and partial-failure semantics. Nothing material is left to inference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3, but the description still adds meaning: it distinguishes bare numbers (resolved against the working tree's repo) from qualified forms, and specifies attachment media types, size ceilings, the 50-item cap, and how `![alt](./shot.png)` references in the body are rewritten into uploads. The pr/repo phrasing largely mirrors the schema, which keeps it from a 5.

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 comment on a pull request', immediately telling an agent this writes PR comments rather than issue comments. It does not explicitly name the nearest sibling (github_issue_comment) or any other alternative, so it is clear but stops short of full sibling differentiation.

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 a concrete prerequisite — 'Needs write permission on the repository' — and states the accepted PR reference forms (12, #12, owner/repo#12, URL), so an agent knows it can call the tool and with what input. It offers no explicit exclusions or when-to-prefer-a-sibling guidance, which keeps it below a 5.

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