Skip to main content
Glama

Add a review comment

add_comment

Leave review comments on a quoted passage, optionally include a replacement suggestion for authors to accept, without changing any files.

Instructions

Leave a review comment on a passage, the way a co-author would: anchored to quote (≥8 characters, copied verbatim from a read, matching one place or set occurrence — the edit_file rules, and the same stale_anchor/ambiguous_anchor errors). body is the comment; suggestion, optional, is replacement text for the quoted passage that the people can accept with one click. Changes no file. Use it when the user asks for review notes or for a change they should decide on, not for edits they asked you to make (use edit_file). The comment shows under your client's name, or "Assistant", for the person whose token you use. mentions @-mentions people by name.

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": {
      "path": "<path>",
      "quote": "<quote>",
      "body": "<body>"
    },
    "name": "add_comment"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesThe comment.
pathYesFile path relative to the project root, e.g. "main.tex" or "sections/intro.tex" — no leading "/", no "..", and hidden folders (.git, .aldine-out) are off limits.
quoteYesExact text the comment is about, copied verbatim. At least 8 characters; must match exactly one place, or use occurrence.
branchNoBranch name (defaults to 'main'). Every result, error results included, echoes {branch, head} — head is the branch's current commit (after a write, the commit that write made). Pass the branch explicitly whenever you are not on main.
projectNoProject id. Optional when the access token is scoped to exactly one project.
mentionsNoPeople to @mention, by the name Aldine shows (list_people). The text must contain "@Name" for each; they get an email if the server sends them.
occurrenceNo1-based occurrence to target when the quote appears more than once.
suggestionNoReplacement text for the quoted passage, offered for the people to accept.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.22.0

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations it discloses that no file is changed, the attribution rule (client name or "Assistant"), that mentions trigger email, and that one-click acceptance is possible via suggestion. It also names the failure modes (stale_anchor/ambiguous_anchor) an agent will hit on bad quotes, which annotations cannot convey. Minor gap: it does not say whether the comment is immediately visible to collaborators or how conflicts on repeated calls behave.

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 core action and anchoring constraint are front-loaded, and the use/don't-use routing comes before the attribution detail. It is dense and em-dash heavy, and the parenthetical about edit_file rules is packed tightly, but no sentence is filler.

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?

With 8 parameters, no output schema, and a non-idempotent write, the description covers the pieces an agent actually needs: what is created, what is not mutated, how anchoring fails, and how to pick this over edit_file. Nothing essential to a correct call is missing.

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 100%, so the baseline is 3; the description still adds meaning by tying quote validation to the edit_file rules and named errors, and by explaining that suggestion is accept-with-one-click replacement text rather than free prose. It stops short of covering branch/project/occurrence semantics in the description, leaving those to the schema.

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 first clause states a specific verb and resource — "Leave a review comment on a passage" — and immediately qualifies the anchoring model. It distinguishes itself from the sibling edit_file by name later in the same paragraph, so an agent can route without opening either 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?

It gives an explicit when-to-use ("user asks for review notes or for a change they should decide on") and an explicit when-not with the named alternative ("not for edits they asked you to make (use edit_file)"). That is the full when/when-not/alternative triad.

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