Skip to main content
Glama

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

NameRequiredDescriptionDefault
pageTokenNoToken from a previous listComments response to fetch the next page.
documentIdYesThe document ID — the long string between /d/ and /edit in a Google Docs URL.
maxResultsNoMaximum number of comments to return in this page (1-100, default 100).
updatedAfterNoISO 8601 datetime. Only return comments/replies modified after this time (maps to the Drive API startModifiedTime filter). Use for incremental polling.
includeDeletedNoWhether to include deleted comments (their content will be empty).
unansweredOnlyNoIf 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".
includeQuotedTextNoWhether to include the quoted document text each comment is anchored to. Set false to save tokens.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0-rc.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does disclose a real quirk: text over 2,000 characters is truncated with a marker, which an agent must know before treating content as complete. It also signals the unansweredOnly post-filter/nextPageToken interaction (though that detail is also in the schema) and the token-saving includeQuotedText option. Missing are permission/auth requirements and ordering guarantees.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, front-loaded with what is listed before drilling into polling, pagination, filtering, and the truncation caveat. No sentence is filler, and the truncation warning is placed at the end where a caller scanning for output expectations will find it.

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?

No output schema exists, so the description must describe returns, and it does: reply metadata, resolved status, quoted text, and truncation behavior, plus the fact that results are usable as inputs to sibling tools. Given seven parameters and no annotations, a note on permissions or empty-result behavior would close the remaining gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so every parameter already carries its own documentation, including the unansweredOnly pagination caveat. The description only restates parameter names in grouped form (updatedAfter, maxResults/pageToken, unansweredOnly) without adding format or syntax meaning beyond the schema, which is the baseline 3 case.

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

Purpose5/5

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

States a specific verb and resource ("Lists comments in a document") and immediately qualifies the scope with reply metadata, resolved status, and quoted text. This makes it clearly distinguishable from getComment, which the description itself names as a downstream consumer rather than a peer.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear situational context – incremental polling via updatedAfter, pagination, and an unansweredOnly filter – and tells the agent the output feeds getComment/replyToComment/resolveComment/updateComment/deleteComment. It does not explicitly say when to prefer getComment or when this listing is unnecessary, so it stops short of full routing guidance.

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

Deploy Server

Other Tools