google-workspace MCP: read tools fail with "Field mask cannot retrieve comment-specific fields when include_comments is false"
Affected tools:
docs_getStructuredocs_getTextdocs_findTextdocs_replaceTextdocs_appendText
Error message (exact):
Field mask cannot retrieve comment-specific fields when include_comments is false.
Steps to reproduce:
- Open a Claude Code session with the google-workspace MCP connected and authenticated
- Call any of the affected tools on any Google Doc, e.g.:
docs_getText(documentId: "<any valid doc ID>")docs_getStructure(documentId: "<any valid doc ID>", mode: "outline")
- Observe the error above — no document content is returned
Root cause analysis:
This is not an authentication or permissions error. Evidence: write tools (batchUpdate, drive_exportFile) use the same OAuth token and work correctly. Auth failures produce 401/403 errors, not field mask errors.
The error is a misconfiguration in the MCP server's Google Docs API call. When reading a document, the Docs API requires a field mask specifying which fields to return. The MCP's field mask appears to include a comment-related field (e.g. suggestionsViewMode or a field under comments) while the request has include_comments: false. The API rejects this combination.
Fix: In the MCP server code, either remove the comment-related field from the documents.get field mask, or set include_comments: true on the request. This is a server-side code change — no client-side workaround is possible for the read tools.
Why write tools still work: batchUpdate calls go to documents.batchUpdate, not documents.get, so they never hit the broken field mask. drive_exportFile uses the Drive API export endpoint, not the Docs API at all.
Impact:
All read operations on Google Docs fail. This blocks any workflow that needs to inspect document content before editing (reading placeholders, finding paragraph indices for heading styles, locating table cell positions). Because indices cannot be read precisely, heading style application and table cell filling both require fragile estimation from plain-text exports, leading to styles landing on wrong paragraphs and tables being inserted with empty cells.
Workarounds in use:
- Replace
docs_getText/docs_getStructure→drive_exportFile(mimeType: "text/plain") - Replace
docs_replaceText→batchUpdatewithreplaceAllText - Replace
docs_appendText→batchUpdatewithinsertText+endOfSegmentLocation - Paragraph/table indices must be estimated from exported plain text (approximate, error-prone)
Environment:
- Package:
google-workspace-mcpv0.1.0 (private, distributed with Claude Code) - Installed at:
~/.nvm/versions/node/v20.20.2/lib/node_modules/google-workspace-mcp/dist/index.js
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗