Skip to main content
Glama

Comment on a build's diff

post_comment

Leave a review comment on one of a build's changed-story diffs (resolve the build by commitSha/prNumber/buildId, target the diff by diffResultId from get_build/get_diff). The comment is authored as the agent. Optionally anchor it to a spot on the candidate image with anchor: omit or null for a whole-diff comment, {type:'point',x,y} to pin a point, {type:'rect',x,y,w,h} for a box, or {type:'path',points:[{x,y},...],closed} for a shape - all coordinates 0..1 normalized to the candidate image. side picks the pane ('after' the candidate, default; 'before' the baseline). Pass parentId (a root comment id from list_comments) to REPLY in that thread instead - a reply inherits the root's side and carries no anchor, so anchor/side are ignored. A new root comment is refused when a newer build exists on the branch (comment on the latest build); replies stay allowed. Requires the image comments feature.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesThe comment text.
sideNoWhich pane: 'after' (candidate, default) or 'before' (baseline). Ignored on a reply.
anchorNoWhere on the candidate image to pin it (0..1 normalized): omit/null = whole diff; {type:'point',x,y}; {type:'rect',x,y,w,h}; {type:'path',points,closed}. Ignored on a reply.
buildIdNoResolve this exact build id.
parentIdNoReply to this thread ROOT comment's id (from list_comments) instead of starting a new thread.
prNumberNoResolve the latest build for this PR number.
commitShaNoResolve the build for this git commit SHA.
diffResultIdYesThe diff result to comment on (from get_build/get_diff).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false, and openWorldHint=false, so the agent knows this is a non-read, non-idempotent mutation. The description adds valuable behavioral context beyond that: the comment is authored as the agent, a new root comment is refused when a newer build exists, replies inherit the root's side and carry no anchor, and the feature requires 'image comments.' It also explains that anchor/side are ignored on replies. This is rich behavioral disclosure that goes well beyond the annotations, though it doesn't explicitly state whether the operation is reversible or what the response contains (the output schema covers that).

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 description is dense but well-organized: it front-loads the core action and resolution method, then explains the optional anchor and side parameters, then the reply behavior, then the refusal condition, and finally the feature requirement. Every sentence earns its place, and the structure follows the natural decision flow an agent would use. It is longer than the calibration examples, but the complexity of the tool (8 params, nested anchor shapes, reply semantics) justifies the length. It could be slightly tighter, but it is not bloated.

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?

Given the tool's complexity (8 parameters, three anchor shape variants, reply semantics, build resolution alternatives, and a refusal condition), the description is remarkably complete. It covers how to resolve the build, how to target the diff, how to anchor, how to reply, what gets ignored on a reply, when a comment is refused, and the feature requirement. The output schema exists, so return values need not be described. An agent has everything needed to call this tool correctly in the right situation.

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 description coverage is 100%, so the schema already documents all 8 parameters. The description adds meaning beyond the schema by explaining the resolution semantics (commitSha/prNumber/buildId as alternative ways to resolve the build), the anchor coordinate system (0..1 normalized to the candidate image), and the reply behavior (parentId from list_comments, reply inherits root's side, anchor/side ignored). This is more than the schema provides, though the schema already does a good job with its own descriptions. The description doesn't add much about body or diffResultId beyond what the schema says, but the added context on anchor, side, and parentId is substantial.

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 opens with a specific verb and resource: 'Leave a review comment on one of a build's changed-story diffs.' It immediately distinguishes the tool from siblings like list_comments, update_comment, and delete_comment by stating the creation action and the target (a diff). It also names the resolution methods (commitSha/prNumber/buildId) and the diff target (diffResultId), so an agent can tell exactly what this tool does without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit when-to-use guidance: it says to resolve the build by commitSha/prNumber/buildId and target the diff by diffResultId from get_build/get_diff. It also explains when to use parentId to reply instead of starting a new thread, and it states a refusal condition: a new root comment is refused when a newer build exists on the branch, while replies stay allowed. This is clear routing guidance that distinguishes the tool from siblings like review_diff and list_comments.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.