Google Docs
Read and edit Google Docs in folders you choose.
Example questions
Try asking your AI client
-
Which Google Docs in my Notes folder changed in the last 2 days?
-
Did Jack ever update the proposal doc a couple of weeks ago?
-
Write a draft Google Doc for Amalie about the new feature - do not create it yet.
-
Summarize the standup doc as a short list of decisions.
-
Replace the word draft with final in the release notes doc.
Overview
Read and edit Google Docs in folders you choose. AI clients can list and search documents, read them as Markdown or plain text, create a document, append text, and replace text.
Prerequisites
- A Google account with Google Docs
- A stackgate.ai account
Getting credentials
- Open My Integrations and choose Google Docs.
- Click Activate, then Sign in with Google.
- Approve the Google consent screen.
- Enable the folders AI clients may use. Documents outside those folders are rejected.
- Optionally limit tool access to Read, or Read and write, before you connect.
stackgate.ai uses its own Google OAuth app. You do not create a Google Cloud project.
Using with AI clients
- Dedicated endpoint:
POST /mcp/google-docs - Private gateway:
google-docs__*tools
Send a stackgate.ai API token as Authorization: Bearer <token> and Accept: application/json, text/event-stream.
See Documentation for HTTP authentication and private gateway setup.
Troubleshooting
- Google Docs integration is not configured - connect Google Docs from My Integrations.
- No folders are enabled - open the integration and enable at least one folder, including My Drive if you want top-level documents.
- Document is not accessible - the file is outside the folders you enabled. Enable the parent folder or move the document.
- Write tools fail with insufficient permissions - reconnect and grant Read and write access.
- 429 Too many requests - Google is rate limiting the connected account. Wait and retry. Reconnecting does not raise the limit.
- Export is larger than 10 MB -
read_documentcannot export that file. Open it in Google Docs or download it with Google Drive. - Auth errors after a while - reconnect Google Docs from My Integrations to refresh the token.
Available tools
-
list_folders
List Google Drive folders enabled for Google Docs in My Integrations.
-
list_documents
List Google Docs in folders enabled in My Integrations.
-
search_documents
Search Google Docs by name inside folders enabled in My Integrations.
-
get_document
Get title, link, and parent folders for a Google Doc inside an enabled folder.
-
read_document
Read a Google Doc as Markdown or plain text. Defaults to Markdown. Exports larger than 10 MB fail.
-
create_document
Create a Google Doc in an enabled folder. Optional content is inserted at the end of the new document.
-
append_text
Append text to the end of a Google Doc in an enabled folder.
-
replace_text
Replace every occurrence of a string in a Google Doc in an enabled folder.
MCP endpoint:
https://stackgate.ai/mcp/google-docs
(HTTP) or via the
private gateway.