Skip to main content
Glama

docs_add_comment

Attach a comment to a specific phrase in a Google Doc, so feedback is anchored to the exact content it refers to.

Instructions

Add a comment anchored to specific text in a Google Doc.

NOTE: The current implementation uses the Drive comments API plus a Docs named range. In the Docs UI this still shows as "Original content deleted" rather than a proper inline comment highlight. The comments ARE readable via docs_read_comments and the Docs 💬 panel.

The next path to investigate is Apps Script automation. The OAuth token must include the script.* scopes, and the Google account must also have the Apps Script API enabled at https://script.google.com/home/usersettings before remote Apps Script project creation/execution will work.

By default the tool also appends the matched anchor text into the comment body so the user can understand what was targeted even though the Docs UI does not render a proper inline highlight with the current API path.

When bookmark_jump=True, the tool also uses a persistent Apps Script bridge (configured via GOOGLE_DOCS_MCP_APPS_SCRIPT_ID) to create a bookmark at the target text, then appends a #bookmark jump URL into the comment body.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYesGoogle Doc ID (from the URL: /document/d/{DOC_ID}/edit)
commentYesThe comment text to post
occurrenceNoWhich occurrence of anchor_text to use (default 1 = first). Use 2, 3, etc. if the text appears multiple times.
anchor_textYesExact text in the document to attach the comment to. Use a short, unique phrase (a few words) for reliable matching.
bookmark_jumpNoIf True, create an Apps Script bookmark and append a jump URL into the comment body. Requires the Apps Script bridge env var setup documented in the README.
include_anchor_textNoIf True (default), append the matched anchor text excerpt into the comment body for human readability.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does this well by explaining the UI limitation ('Original content deleted'), the current Drive/Docs API path, default anchor-text appending, and the bookmark_jump bridge behavior.

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

Conciseness3/5

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

The key information is front-loaded, but the description is bloated with a multi-sentence roadmap about a future Apps Script automation path and OAuth/API enablement. That content is not needed to invoke the current tool correctly.

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?

Given six parameters and no annotations, the description provides important caveats, prerequisite setup for bookmark_jump, and expected user-visible limitations. An output schema exists, so missing return-value details are less critical. The main gap is lack of alternative-tool routing.

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 description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by explaining the behavioral consequences of bookmark_jump and include_anchor_text, such as appending anchor text to the comment body and requiring the Apps Script bridge.

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 opens with a specific verb and resource: 'Add a comment anchored to specific text in a Google Doc.' This clearly separates it from comment-management siblings like docs_reply_to_comment, docs_resolve_comment, and docs_delete_comment.

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

Usage Guidelines2/5

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

There is no guidance about when to choose this tool instead of docs_reply_to_comment or docs_read_comments. The description explains implementation behavior and parameter effects but does not give selection criteria or exclusions.

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

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/dbuxton/google-docs-mcp'

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