Google Docs
Arcade toolkit · docs.arcade.dev
The Google Docs toolkit connects Arcade to the Google Docs and Drive APIs, enabling LLMs to create, read, edit, search, and comment on documents on behalf of a connected Google account.
Capabilities
- Document creation: Create blank documents or documents pre-populated with plain text or Markdown (headings, bold, italic, lists) in the connected account's Drive root.
- Reading and metadata: Retrieve documents in raw API form, as compact DocMD (block IDs, character indices, styles), or as metadata only (title, ID, URL, tab structure, character counts).
- Editing and appending: Apply structured
batchUpdaterequests to any accessible document using DocMD indices, or append text to the end of a specific tab. - Comments: Post whole-document comments as the connected account, and list a document's comments with replies, authors, quoted passages, and resolved status — paged for large threads.
- Search: Search the accessible document corpus by query, returning metadata only or metadata plus body content; trash is excluded automatically.
- Access management and identity: Generate a Google Drive file picker URL so users can grant per-file access to the app, and resolve the connected account's profile (name, email, avatar) via
WhoAmI.
Tools13
GoogleDocs_CommentOnDocument
Comment on a specific document by its ID. Reaches only documents this app has been granted edit access to — by default, those it created or the user picked. The comment is posted as the connected account and notifies the document's collaborators. The comment covers the whole document. No API can anchor a new Google Docs comment to a passage, so the Docs UI lists it in the sidebar without highlighting any text. Quote the passage inside comment_text when the comment is about one.
GoogleDocs_CreateBlankDocument
Create an empty Google Docs document with the specified title. The document is owned by the connected account and lands in its Drive root. Returns the new document's id, which every other tool here takes as its target. To create a document that already has content, use the tool that takes text rather than creating an empty one and appending to it.
GoogleDocs_CreateDocumentFromText
Create a Google Docs document with the specified title and text content. When input_format is MARKDOWN, the text_content is parsed as Markdown and the resulting document is formatted with headings, bold, italic, bullet lists, and numbered lists.
GoogleDocs_EditDocument
Read or edit a Google Docs document using structured batchUpdate requests. Reaches only documents this app has been granted edit access to — by default, those it created or the user picked. When called without requests, returns the document content in DocMD format (block IDs, character indices, and text styles). When called with requests, applies the edits and returns the updated DocMD. Use the DocMD indices from the response to construct requests for subsequent calls.
GoogleDocs_GenerateGoogleFilePickerUrl
Generate a URL where the user can grant this app access to specific Drive files. Check url first. An empty url with a reason means this app already reaches every document the connected account can open, so there is no per-file grant to request: this tool cannot change any outcome, and a document that could not be read is one the account itself cannot open. Do not retry it. Otherwise the URL opens Google's first-party Drive picker, where the user selects which files to share with this application — it is not a sign-in or credential prompt. Use this when a prior tool reported that a file was not found or access was denied, and the user expects the file to exist. After the user completes the picker flow, retry the prior tool.
GoogleDocs_GetDocumentAsDocmd
Get the latest version of the specified Google Docs document as DocMD. Reaches only documents this app has been granted access to — by default, those it created or the user picked. The DocMD output will include tags that can be used to annotate the document with location information, the type of block, block IDs, and other metadata. If the document has tabs, all tabs are included in sequential order unless a specific tab_id is provided.
GoogleDocs_GetDocumentById
Get a Google Docs document as the raw Google Docs API document resource. Returns the API's own structure, including every tab's content. Reaches only documents this app has been granted access to — by default, those it created or the user picked. Use this when the document's exact structure matters, such as reading style runs, named ranges or inline object properties. For reading or summarizing the text, prefer the DocMD form, which is far smaller and carries the character indices edits are built from.
GoogleDocs_GetDocumentMetadata
Get metadata for a Google Docs document including hierarchical tab structure. Reaches only documents this app has been granted access to — by default, those it created or the user picked. Returns document title, ID, URL, total character count, and nested tab information with character counts for each tab.
GoogleDocs_InsertTextAtEndOfDocument
Append text to the end of a Google Docs document. Reaches only documents this app has been granted edit access to — by default, those it created or the user picked. Each tab keeps its own content and its own character indices, so the text lands at the end of one tab rather than the end of the file.
GoogleDocs_ListDocumentComments
List comments on the specified Google Docs document. Reaches only documents this app has been granted access to — by default, those it created or the user picked. Returns each comment's text, its replies, and the display name of whoever wrote it. Drive does not document an order for comments, so do not read the first one as the most recent; compare createdTime when recency matters. A long-running document can carry thousands of comments, so results are paged rather than returned whole, and the counts describe the page in hand rather than the document. A comment anchored in the Docs UI carries quotedFileContent, the passage it is attached to, so finding that text in the document body places the comment. A comment that covers the whole document has no quotedFileContent. Each comment also reports whether its thread has been resolved.
GoogleDocs_SearchAndRetrieveDocuments
Search for documents in the user's Google Drive and return documents with their main body content and tab metadata. Excludes documents that are in the trash. Searches only the documents this app has been granted access to — by default, those it created or the user picked. Content it returns was written by whoever has edited each document, which need not be the connected account and need not be the owner. Returns main body content only with metadata about tabs. To read every tab of a specific document, retrieve that document by its id. When only metadata is needed, search without retrieving content.
GoogleDocs_SearchDocuments
Search for documents in the user's Google Drive. Excludes documents in trash. Searches only the documents this app has been granted access to — by default, those it created or the user picked. Returns metadata only. To read a document's content, retrieve it by its id.
GoogleDocs_WhoAmI
Get the connected Google account's profile: name, email address and profile picture. Use this to confirm which account the connection is acting as before creating or editing a document, or when the user asks who they are signed in as. It reads the Google profile and opens no document, so it does not report which documents this app can reach. To find out whether a particular document is reachable, search for it or open it. Fields Google does not return are omitted rather than empty.