listComments
Lists document comments with reply metadata, resolved status, quoted text, and filters for unanswered or recently updated items, enabling comment review and follow-up actions.
Instructions
Lists comments in a document with accurate reply metadata, resolved status, and quoted text. Supports incremental polling (updatedAfter), pagination (maxResults/pageToken), and an unansweredOnly filter. Returns data needed to call getComment, replyToComment, resolveComment, updateComment, or deleteComment. Comment/reply/quoted text over 2,000 characters is truncated with a "…[truncated]" marker.
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": {
"documentId": "<documentId>"
},
"name": "listComments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageToken | No | Token from a previous listComments response to fetch the next page. | |
| documentId | Yes | The document ID — the long string between /d/ and /edit in a Google Docs URL. | |
| maxResults | No | Maximum number of comments to return in this page (1-100, default 100). | |
| updatedAfter | No | ISO 8601 datetime. Only return comments/replies modified after this time (maps to the Drive API startModifiedTime filter). Use for incremental polling. | |
| includeDeleted | No | Whether to include deleted comments (their content will be empty). | |
| unansweredOnly | No | If true, only return unresolved comments whose latest reply (if any) was not written by the authenticated user. Heuristic: a comment with no replies counts as unanswered; a comment last replied to by the authenticated user counts as answered even if that reply did not resolve it. Filtering happens AFTER fetching this page: count and comments reflect the post-filter page, while nextPageToken is computed from the pre-filter page, so a page that filters down to zero comments can still carry a nextPageToken — follow it rather than reading an empty page as "no more results". | |
| includeQuotedText | No | Whether to include the quoted document text each comment is anchored to. Set false to save tokens. |