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
| 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. |