Skip to main content
Glama

Add a review-panel comment

add_comment

Start a new comment thread anchored to exact quoted text in a project document, without changing the text. Use it for questions or suggestions that should not be edits.

Instructions

Starts a new comment thread anchored to quoted_text in a doc, exactly like selecting text in Overleaf and clicking 'Add comment'. The text itself is not changed. Use this for questions or suggestions that should not be edits.

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": {
      "quoted_text": "<quoted_text>",
      "content": "<content>"
    },
    "name": "add_comment"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoProject-relative path of the doc to comment on, e.g. 'sec/intro.tex'. Defaults to the project's root doc.
contentYesThe comment text.
occurrenceNo1-based index of the match to anchor on when `quoted_text` occurs more than once.
project_idNoOverleaf project id from list_projects or open_project. Opens the project if it is not already active. Pass it on every call when MCP sessions may change between calls. Writes without it only go to the project last confirmed by open_project or by a write naming it.
quoted_textYesExact text the comment is anchored to (highlighted in the editor), matched byte-for-byte. Must occur exactly once in the doc unless `occurrence` picks one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden, and it does disclose the most important trait: the operation does not modify the document text. However, it says nothing about failure behavior when the anchor cannot be resolved, whether a project must be open (only the schema's project_id covers this), or what the call returns, which matters for a mutation tool with zero annotation coverage.

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 short sentences, front-loaded with the core action and its non-mutating guarantee, with no redundant phrasing. Every sentence contributes either the action, the analogy for disambiguation, or the usage condition.

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 5-parameter tool with full schema coverage and no output schema, the description covers what the tool does, what it does not do, and when to reach for it. The remaining gap is minimal: the agent is not told what a successful call yields (comment id, thread reference) or how anchor-resolution failures surface.

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 path, content, occurrence, project_id, and quoted_text are all fully documented in the schema, including the byte-for-byte matching rule and the occurrence disambiguation. The description restates the anchoring concept but adds no syntax, format, or constraint detail beyond what the schema already supplies, so the baseline of 3 applies.

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 gives a specific verb and resource ("Starts a new comment thread anchored to `quoted_text` in a doc") and reinforces it with a concrete analogy to Overleaf's select-text / "Add comment" flow. It separates the tool from sibling write tools by stating "The text itself is not changed" and "Use this for questions or suggestions that should not be edits," so an agent can tell it apart from edit_file or reply_comment without opening a 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?

"Use this for questions or suggestions that should not be edits" gives clear when-to-use guidance and implicitly excludes content-changing tools. What's missing is an explicit named alternative for the excluded case (e.g., "for changes to the text, use edit_file") or a note on when to use reply_comment instead of starting a new thread.

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