Google Docs
Create Google Docs, read a document's full content and structure, and edit it with batched requests. Connect a Google account with OAuth.
- rest
https://api.superagnt.com/v1/connections/google-docsplus the vendor's own path, with your superagnt_ API key asAuthorization: Bearer.- mcp
- Tools named
connection_google_docs_*onhttps://mcp.superagnt.com/mcp, served once the account is connected. - billing
- Google Docs bills your own account. Calls cost no superagnt_ data credits.
- rate limit
- 60 requests a second, 300 a minute: the vendor's ceiling as the registry records it, for sizing bursts. Your plan's own limit is on Connections.
- vendor docs
- https://developers.google.com/docs/api
The Google Docs connection lets an agent write and read documents in a connected Google account. It creates a document, reads a document's full content and structure (body, lists, tables, styles, footnotes, headers and footers), and edits it by applying Google Docs batchUpdate requests: insert, replace or delete text, add tables, change styles.
01
Setup
- Start the install. In the superagnt app open Integrations, pick Google Docs and press Connect with Google.
- Approve access. Pick the Google account and approve. superagnt_ asks for your Google Docs (
documents), per-file Drive access (drive.file), and your email address and profile, which label the connection.
Each Google app connects on its own: connecting Google Docs gives no access to Google Sheets, Google Calendar or Google Search Console. When one of those is already connected, the Google Docs dialog offers Connect Google Docs, which asks that same Google account for the Docs permission only. superagnt_ refreshes Google's access tokens for you.
02
Things to know
- A document's id is in its URL:
https://docs.google.com/document/d/<documentId>/edit. Thedocumentsscope reaches every document the Google account can open, not only the ones an agent created. connection_google_docs_writeactioncreatemakes an empty document with only a title. Add its content withbatch_update.batch_updateapplies itsrequestsatomically: if one fails, none is applied. A position in the body is an index, and the body starts at index 1, so read the document first to find where to edit.- To fill a template, a
replaceAllTextrequest swaps every match of a placeholder without any index math. writeControlis an optional revision guard: withrequiredRevisionIdset, the edit fails if the document changed since you read that revision.gettakessuggestionsViewMode, for examplePREVIEW_SUGGESTIONS_ACCEPTEDto read the text as if every suggestion were accepted.- Creating and editing run without asking by default (Permissions).
- The connection does not cover Google Drive: it cannot list, search, share, move or delete documents.
03
Examples
Create a document
curl -X POST "https://api.superagnt.com/v1/connections/google-docs/v1/documents" \
-H "Authorization: Bearer $AGNTDATA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title": "Weekly pipeline report"}'Insert text at the start
curl -X POST "https://api.superagnt.com/v1/connections/google-docs/v1/documents/<documentId>:batchUpdate" \
-H "Authorization: Bearer $AGNTDATA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"requests": [
{"insertText": {"location": {"index": 1}, "text": "Pipeline grew 12% this week.\n"}}
]
}'Read a document
curl "https://api.superagnt.com/v1/connections/google-docs/v1/documents/<documentId>" \
-H "Authorization: Bearer $AGNTDATA_API_KEY"2 tools, one per resource and risk
MCP servers and agents on the grouped surface list Google Docs as these tools. Each takes an action, and the ones that work across record types an object. Every operation also keeps its own per-operation name, in the next table, which works on every server. How grouping works: Grouped tools.
| Tool | Risk | Actions |
|---|---|---|
connection_google_docs_readRead Google Docs Get a document's full content and structure by documentId (from the URL /document/d/<documentId>/edit). | read | get |
connection_google_docs_writeCreate and edit Google Docs Create an empty document with a title, or edit one by applying Google Docs batchUpdate requests (insert, replace or delete text, tables, styles) atomically. | write | createbatch_update |
All 3 operations
Each operation is a REST path under https://api.superagnt.com/v1/connections/google-docs and an MCP tool. The per-operation tool name is the one permissions, approvals and usage records use.
| Operation | MCP tool |
|---|---|
POST /v1/documentsCreate a new document | connection_google_docs_documents_creategrouped: connection_google_docs_write, action create |
GET /v1/documents/{documentId}Get document | connection_google_docs_documents_getgrouped: connection_google_docs_read, action get |
POST /v1/documents/{documentId}:batchUpdateApply batched edits | connection_google_docs_documents_batch_updategrouped: connection_google_docs_write, action batch_update |