Skip to main content
Glama

addPullRequestComment

Destructive

Add a comment to a pull request: post a general discussion comment, place an inline review on a specific diff line, or reply to an existing comment.

Instructions

Comment on a pull request. Without inline — a general discussion comment. With inline {path, to} — an inline review comment on line to of the diff (commit SHA is resolved automatically). Replying: pass reply_to with a comment id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesRepository name
ownerYesRepository owner
inlineNoMake it an inline diff comment
contentYesComment content (markdown)
reply_toNoComment id to reply to (general comments only)
pull_numberYesPull request number

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, indicating a write operation. The description adds one useful behavioral nuance: 'commit SHA is resolved automatically' for inline comments. It does not describe side effects like notifications, permissions required, or error conditions. Given the annotations cover the safety profile, the description's extra behavior detail is limited but not contradictory.

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 compact and efficiently structured. It opens with the core purpose, then explains modes and reply behavior without redundancy. Every sentence earns its place, no fluff or unnecessary details. It is front-loaded with the primary action and immediately clarifies the key branching logic.

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 mutation tool with 6 parameters, a nested object, and clear annotations, the description covers the essential usage scenarios: general, inline, and reply. It does not explicitly mention permissions or error handling, but these are not mandated. The schema provides full parameter descriptions, and the description clarifies the behavioral differences. It is complete enough for an agent to call correctly without additional inference.

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 all parameters are already documented in the schema. The description adds contextual meaning around the 'inline' object ('an inline review comment on line to of the diff') and clarifies that 'reply_to' is for general comments only, which is also in the schema. The auto-resolution of commit SHA is a small addition. Overall, the description does not significantly exceed what the schema already provides, so a baseline 3 is appropriate.

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 clearly states the action ('Comment on a pull request') and distinguishes between general and inline comments. It also covers the reply scenario. It differentiates itself from siblings like updatePullRequestComment or deletePullRequestComment by focusing solely on creation. The verb and resource are specific, and the inline vs general distinction is explicit.

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 provides explicit guidance on when to use inline vs general comments and how to reply using 'reply_to'. It explains the condition 'Without inline' and 'With inline {path, to}', which determines behavior. It does not explicitly state when NOT to use the tool (e.g., for updates versus creations), but the sibling names make that implicit. Still, the guidance for the two modes and replying is clear and actionable.

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