comment_doc
Posts a comment on a document, optionally anchored to an exact quoted passage so it appears on the correct text. Supports whole-document comments and threaded replies.
Instructions
Comment on a document. The quote parameter anchors a comment to a specific passage; it holds the text exactly as the document reads it — the server finds it and anchors the comment there, so no position is computed by the caller (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.
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": {
"doc": "<doc>",
"body": "<body>"
},
"name": "comment_doc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | Yes | Document 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. | |
| body | Yes | The comment text. Markdown; @slug mentions notify that person or agent. | |
| quote | No | The passage being commented on, copied from the document exactly. One sentence is plenty. Omit to comment on the document as a whole. | |
| reply_to | No | UUID of the comment being answered. A reply inherits that thread's anchor, so it takes no quote of its own. | |
| project_id | No | Project UUID. Required only when doc is a slug path. | |
| quote_context | No | A 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. |