Skip to main content
Glama

comment_add

Anchor a new agent-signed comment to a file line range; use task to queue work or note to inform the next reader, then get its ID and state as JSON.

Instructions

Anchor a new comment to a line range, signed by the agent. A task (the default) joins the user's task queue as work to do; a note explains something to the next reader without asking for action. Answers the new comment's id and state as JSON. To answer an existing comment use comment_reply; during a guided review use review_propose_comment, which the human approves first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoLast line of the range, inclusive. Defaults to `line`.
bodyYesThe comment, in Markdown.
fileYesProject-relative path, e.g. `src/lib/api.ts`.
kindNo`task` asks for work (default); `note` only informs.
lineYesFirst line of the range, 1-based.
typeNoWhat the comment is about. Defaults to note.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv1.32.1
    • addedInput schema / properties / body / description
      Added value: +"The comment, in Markdown."
    • addedInput schema / properties / end / description
      Added value: +"Last line of the range, inclusive. Defaults to `line`."
    • addedInput schema / properties / end / minimum
      Added value: +1
    • changedInput schema / properties / end / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / file / description
      Added value: +"Project-relative path, e.g. `src/lib/api.ts`."
    • addedInput schema / properties / kind / description
      Added value: +"`task` asks for work (default); `note` only informs."
    • addedInput schema / properties / kind / enum
      Added value: +[
      +  "task",
      +  "note"
      +]
    • addedInput schema / properties / line / description
      Added value: +"First line of the range, 1-based."
    • addedInput schema / properties / line / minimum
      Added value: +1
    • changedInput schema / properties / line / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / type / description
      Added value: +"What the comment is about. Defaults to note."
    • addedInput schema / properties / type / enum
      Added value: +[
      +  "bug",
      +  "refactor",
      +  "performance",
      +  "question",
      +  "note"
      +]
  2. First observedv1.32.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare the write/non-idempotent profile (readOnlyHint=false, idempotentHint=false), and the description adds real behavior beyond them: the comment is agent-signed, a `task` joins the user's task queue as actionable work, and the call returns the comment's id and state as JSON. It omits auth/permission requirements and whether the anchor must lie within the file's existing line count, so it is strong but not exhaustive.

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?

Three tight sentences, front-loaded with the action and anchor semantics, then mode semantics, then routing. No filler and nothing repeated from the schema.

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?

Although there is no output schema, the description states the return payload (id and state as JSON) and provides sibling routing, which covers most of what an agent needs. The remaining gap is disambiguating the two enums (kind vs. type) that both accept "note".

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 a 3 is the baseline; the description goes further by explaining the consequence of `kind`: `task` (default) enters the user's queue as work, `note` only informs. It does not clarify the overlap between the `kind` and `type` enums, both of which include "note".

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?

States a specific verb and resource ("Anchor a new comment") plus the anchoring scope (a line range) and the authorship attribute ("signed by the agent"). It also draws a clear boundary against two sibling tools (comment_reply, review_propose_comment), so an agent can select it without opening any 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?

Explicitly routes: existing comment -> comment_reply, in-review flow -> review_propose_comment (with the note that a human approves first). It also gives the selection criterion between the two modes of this tool itself (task = work to do, note = informs only).

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