add_anchored_comment
Add a comment to a specific quoted passage in a Google Docs tab. Validates the quote exists, returns comment-state evidence, and lists nearest matches if not found.
Instructions
Add a comment to a document, validated against a quoted passage.
Use this tool when you need to create a comment on specific text in a document tab. The quote must exist in the tab — the tool locates it via the same normalization ladder as replace_text and returns QUOTE_NOT_FOUND with nearest candidate anchors if the quote is absent.
NOTE: The Drive API may render the created comment as document-level even when quotedFileContent is supplied. This behaviour is pending confirmation from a live anchoring spike; for now the comment is created with the quote embedded in its content and the tool returns comment-state evidence.
Returns comment-state evidence: applied, comment_id, resolved, reply_count, content, quoted_text, audit_logged.
Errors: QUOTE_NOT_FOUND – quote not found in the tab; nearest candidates listed INVALID_INPUT – empty body or quote TAB_NOT_FOUND – tab_id not in document
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| quote | Yes | ||
| doc_id | Yes | ||
| tab_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||