Skip to main content
Glama

comment_doc

Create document comments, anchoring feedback to an exact quoted passage automatically without offsets, or comment on the whole document; replies inherit thread anchors.

Instructions

Comment on a document. To comment on a specific passage, pass quote with the text exactly as the document reads it — the server finds it and anchors the comment there, so you never compute a position yourself (there is no offset parameter, and a position you calculated would silently point at the wrong sentence). Without quote the comment is on the whole document. Your comment appears in the same thread humans see in the document UI. doc may be an old path or a bare slug; the reply then carries moved_to (the current path). An ambiguous bare slug is a 409 listing the full paths.

Input Schema

NameRequiredDescriptionDefault
docYesDocument UUID, or a slug path like 'architecture/adr/adr-004' (a path also needs project_id). A path survives the document being moved: the old path still resolves, and so does a bare slug ('adr-004') when exactly one live document in the project has it. When the reference was not the live path, the reply carries moved_to — the document's current path; use that from now on. A bare slug shared by several documents is a 409 ('Ambiguous document slug') listing the full paths: pick one and repeat the call with the full path or the UUID. The UUID never changes.
bodyYesThe comment text. Markdown; @slug mentions notify that person or agent.
quoteNoThe passage being commented on, copied from the document exactly. One sentence is plenty. Omit to comment on the document as a whole.
reply_toNoUUID of the comment being answered. A reply inherits that thread's anchor, so it takes no quote of its own.
project_idNoProject UUID. Required only when doc is a slug path.
quote_contextNoA longer passage containing the quote exactly once — send this when the quote occurs several times in the document and you were told it was ambiguous.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.4/5.0
Behavior5/5

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

With annotations only declaring the generic write profile (readOnlyHint=false, idempotentHint=false, destructiveHint=false), the description carries real behavioral load: anchoring is resolved server-side and any computed offset would silently point at the wrong sentence, ambiguous slugs yield a 409 with candidate paths, and a moved-document reply carries moved_to that should be used from then on. That is meaningful retry and identity-resolution context an agent needs.

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?

Front-loaded with the core purpose, then the anchoring rule, then document-resolution behavior. Sentences are information-dense with little filler, though the moved_to/409 slug-resolution material is repeated between the description and the doc parameter schema, which costs a little efficiency.

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 six-parameter mutation tool with no output schema, the description covers identification, anchoring, threading, and failure recovery well. It doesn't describe what the posted comment returns (id, thread position, or error shapes beyond 409 and moved_to), which leaves a small gap for an agent that needs to chain the result.

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 baseline is 3, but the description genuinely adds semantics: it explains why there is no offset parameter, that reply_to takes no quote because the anchor is inherited, and when quote_context is required. It stops short of clarifying project_id's relationship to UUID-form doc references beyond the schema's version.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb+resource ('Comment on a document') with added scope: whole-document vs anchored-passage commenting, and clarification that the comment lands in the same thread humans see. It does not explicitly distinguish itself from the sibling add_comment (presumably task-scoped) or update_doc, so an agent must infer that boundary.

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?

Gives explicit when-to-use branches: pass quote for a passage, omit it for the whole document, use reply_to to answer inside a thread (which inherits the anchor), and send quote_context when the quote is ambiguous or the server reports ambiguity. It also states the alternative paths for identifying a document (path, bare slug, UUID) and what to do on 409.

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