Google Docs
v1.2.0Allow AI systems to read and edit Google Docs.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
document_get_raw Get document (raw)
Get the full raw JSON structure of a Google Doc, including all tabs, formatting, headers, footers, and styles. Google Docs content is organized under tabs - body content is at tabs[].documentTab.body.content, not at the top level. Warning: responses can be very large. Consider using jq to extract specific fields, or use document_get_text for plain text content.
| Parameter | Type | Description |
|---|---|---|
documentId * | string | The ID of the document to retrieve |
suggestionsViewMode | string | The suggestions view mode to apply to the document |
document_get_text Get document text
Get the plain text content of a Google Doc without formatting, including all tabs. Google Docs content is organized under tabs (at tabs[].documentTab.body.content in the raw API), but this tool extracts and flattens the text for you. For very long documents, consider writing output to a file and reading specific sections.
| Parameter | Type | Description |
|---|---|---|
documentId * | string | The ID of the document to retrieve |
document_create Create document
Create a new blank Google Doc with the specified title.
| Parameter | Type | Description |
|---|---|---|
title * | string | The title of the new document |
document_batch_update Batch update document
Apply one or more updates to a Google Doc. Supports inserting/deleting text, find/replace, inserting images and tables, managing bullets, and more. All requests are applied atomically - if any fails, none are applied.
document_append Append to document
Append text to the end of a Google Doc. This is a convenience wrapper around batch_update that inserts text at the end of the document body.
| Parameter | Type | Description |
|---|---|---|
documentId * | string | The ID of the document to append to |
text * | string | The text to append to the end of the document |
document_insert Insert into document
Insert text at a specific location in a Google Doc. Use document_get to find the appropriate index. Index 1 is the beginning of the document body.
| Parameter | Type | Description |
|---|---|---|
documentId * | string | The ID of the document to insert into |
index * | number | The zero-based index where to insert the text. Index 1 is the beginning of the document body (index 0 is reserved). |
text * | string | The text to insert |
segmentId | string | The ID of the header, footer, or footnote to insert into. Leave empty for the main body. |
document_replace Find and replace in document
Find and replace all occurrences of text in a Google Doc. Returns the number of replacements made.
| Parameter | Type | Description |
|---|---|---|
documentId * | string | The ID of the document |
findText * | string | The text to search for |
replaceText * | string | The text to replace matches with |
matchCase | boolean | Whether the search should be case-sensitive |