Skip to main content
Glama

add_comment

Add an inline comment anchored to a specific text fragment in a Google Doc for feedback or edits. Omit the text fragment to add a general comment on the document.

Instructions

Add an inline comment anchored to a specific text fragment in a Google Doc (the comment is pinned to that exact phrase, like selecting text and commenting on it by hand). USE THIS WHEN the user wants to leave feedback, notes, questions, edits, or review comments on specific passages of a Google Doc — e.g. "review this doc and comment on the weak spots", "leave a comment on that sentence", "add editorial feedback inline". This is the ONLY way to place anchored comments: the Google Docs and Drive APIs cannot anchor a comment to a text range, so this drives a real logged-in Docs session in a browser. Do NOT use for list/reply/resolve/delete — those work over the Drive API. Requires a one-time npx gdocs-comments-mcp login by the human operator (you cannot log in for them). Omit find_text to add a general, unanchored comment on the document instead. Returns only { ok, anchored, occurrence_used, verified } — never document content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docYesGoogle Docs document id, or the full docs.google.com/document/d/<id>/edit URL.
find_textNoExact single-line text fragment to anchor the comment to. Must match the doc text exactly; pick a fragment unique enough to identify the spot (or pass occurrence). Omit for a general, unanchored comment on the whole document.
occurrenceNoWhen find_text appears multiple times, anchor to the N-th match (1-based). Default: 1.
comment_textYesThe comment body. Plain text; newlines allowed.
Behavior5/5

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

Despite no annotations, the description fully discloses behavioral traits: it drives a real browser session, requires prior login, and returns only specific fields (ok, anchored, occurrence_used, verified). It also clarifies that anchoring is only possible through this tool, not via Google APIs directly.

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

Conciseness4/5

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

The description is front-loaded with the primary purpose and action. It contains all necessary information but has slight redundancy (e.g., mentioning the browser session twice). Could be tightened slightly without losing clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 4 parameters, no output schema, and no annotations, the description covers all user needs: prerequisites, behavior, return values, and distinction from alternatives. No critical gaps remain for an AI agent to misuse the tool.

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

Parameters4/5

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

Schema coverage is 100%, but the description adds extra value: explains doc accepts ID or full URL, find_text must be exact and unique, occurrence is 1-based, and comment_text is plain text with newlines. It also describes behavior when find_text is omitted.

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?

The description clearly states the tool adds an inline comment anchored to a text fragment in a Google Doc, with concrete examples of usage scenarios. It distinguishes itself from sibling tool check_connection and other comment operations like list/reply/resolve/delete that use the Drive API.

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

Usage Guidelines5/5

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

Explicitly says when to use (leaving feedback on specific passages) and when not to use (list/reply/resolve/delete operations via Drive API). Mentions required human login step and optional omission of find_text for unanchored comments. Provides clear context for decision-making.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Abdulreh4874/gdocs-comments-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server