Skip to main content
Glama

Add review comment

add_review_comment

Post a comment on a GitWarren review, either as a general note or anchored to a specific line in the diff or file, with options for diff side and line ranges.

Instructions

Start a new discussion on a review. Omit filePath and line for a comment on the review as a whole; give both to attach it to a line, the way a pull-request review comment works. side picks which side of the diff line counts on - "head" (the default) for the code as it will be, "base" to remark on a line the change removed. Add startLine to comment on a block rather than a single line; line is then the last line of it, and the one the whole range follows if the code moves. The line is not required to be part of the diff. A line the patch does not print is looked up in the file itself at the head, so a remark on code this branch did not touch anchors and follows that code exactly as one on a changed line does - people read these in the review's Browse files tab. Only a line that is in neither the diff nor the file (past the end of it, or on the "base" side outside the patch) is kept without an anchor; the returned thread says which happened. Comments are attributed automatically from the MCP handshake - see agent_identity.

To include a screenshot, write the file to disk first, then reference it as an ordinary markdown image:

The dropdown renders behind the modal:

![dropdown behind modal](/tmp/dropdown-bug.png)

The file is copied into GitWarren and the path rewritten, so the image survives /tmp being cleaned. Always write alt text - it is what agents without vision see.

If the path contains a space - "Screen Shot 2026-09-01 at 10.32.14.png", as macOS names screenshots - wrap it in angle brackets, or markdown does not read it as an image at all and it is left as plain text:

![login screen](</tmp/Screen Shot 2026-09-01 at 10.32.14.png>)

PNG, JPEG, GIF and WebP are accepted, up to 10 MB. A path that does not resolve is left in the text as written rather than failing the call, so check the returned body if it matters.

Each result carries guiUrl, a link that opens this in GitWarren. Show it to the user - it exists to be clicked, and it is how they see this without going and finding it themselves. The link works whether or not GitWarren is running right now, so hand it over without checking anything. If the user says it will not open - the browser reports that the connection was refused - then GitWarren is not running on their machine, and starting it makes the same link work. When the page is served by gitwarren serve or by a plugin rather than by the app, the link also carries that launch's token, which the page exchanges for a cookie; a link minted before a restart says it needs a token, and the newest link is the one that works.

When this machine is reachable on the user's tailnet, results also carry webUrl. The two links are for two situations and neither replaces the other: guiUrl opens GitWarren on the machine the user is sitting at, which is the right one when that is this machine; webUrl opens the same review in a browser from any of their devices - a phone, a laptop across the room - because it names this machine on their tailnet. Offer webUrl when the user is not at this machine, and both when you do not know.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
lineNo
sideNohead
changesNoall
filePathNo
reviewIdYes
startLineNo
agentLabelNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.17

TDQS

A4.4/5.0
Behavior5/5

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

The description goes far beyond the annotations. It details how anchors are resolved (a line not in the diff is looked up in the head file, only a line in neither is kept unanchored), that comments are attributed from the MCP handshake, that unattached paths are left as text rather than failing the call, image type/size limits, and the distinct guiUrl vs webUrl behaviors. It confirms the annotations (write, non-idempotent, non-destructive) without contradicting them - no contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Core positioning semantics are front-loaded, which is good. But the description sprawls: three paragraphs are devoted to markdown image syntax, path-escaping with spaces, file formats, and size limits, and another two long paragraphs to tailnet/webUrl mechanics. Valuable detail, but much of it could be condensed; it does not earn every sentence's place.

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 an 8-parameter tool with no output schema and zero schema descriptions, the description covers the intricate comment-placement logic and even partial return-value fields (thread anchoring result, guiUrl, webUrl). The notable gap is two undocumented parameters - 'changes' and 'agentLabel' - which no structured field explains. Nearly complete, but those omissions keep it from a 5.

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 0%, so the description must carry the explanatory load. It does this superbly for the hard parameters - filePath/line pairing, the 'side' head/base meaning, and startLine's block semantics. But it leaves several parameters unaddressed: the 'changes' enum (committed/all/uncommitted) is never explained, and 'agentLabel' is not mentioned at all. Strong compensation for the tricky location params, incomplete for the rest.

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?

Opens with a specific verb-plus-resource: 'Start a new discussion on a review.' This cleanly stakes out its place against the sibling set (reply_to_review_comment, update_review_comment, delete_review_comment, resolve_review_comment) - it is the one that opens a fresh thread, not one that replies to, edits, or deletes an existing one. The title reinforces it without needing 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 Guidelines4/5

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

The 'Start a new discussion' framing plus the description of line anchoring ('the way a pull-request review comment works') gives clear context for when this tool applies. However, it never explicitly names the sibling alternative or states an exclusion - e.g., it does not say 'for replies to an existing comment use reply_to_review_comment.' The when-to-use is strongly implied but the when-not-to-use alternative is left to inference.

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