/google-docs | Type: Application | PCID required: Yes
Tools
| Tool | Description |
|---|---|
google_docs_batch_update | Applies one or more updates to the document. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests. For example, suppose you call batchUpdate with four updates, and only the third one returns information. The response would have two empty replies, the reply to the third request, and another empty reply, in that order. Because other users may be editing the document, the document might not exactly reflect your changes: your changes may be altered with respect to collaborator changes. If there are no collaborators, the document should reflect your changes. In any case, the updates in your request are guaranteed to be applied together atomically. |
google_docs_create_document | Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored. Returns the created document. |
google_docs_find_and_replace | Find and replace text throughout a Google Docs document. Returns the number of occurrences changed. Uses the batchUpdate API with a replaceAllText request. |
google_docs_get_document | Gets the latest version of the specified document. |
google_docs_insert_page_break | Insert a page break into a Google Docs document at the specified position. Uses the batchUpdate API with an insertPageBreak request. |
google_docs_insert_table | Insert a table into a Google Docs document at the specified position. Uses the batchUpdate API with an insertTable request. |
google_docs_insert_text | Insert text at a specific location in a Google Docs document. Uses the batchUpdate API with an insertText request. |
google_docs_list_trigger_capabilities | List available Google Docs trigger types and their configurations. Returns the supported trigger types for document change monitoring. |
google-docs_poll_trigger | Poll for changes to a specific Google Docs document by checking its current revision against a previous cursor. Returns change events when the document has been modified since the last poll. |
google_docs_batch_update
Applies one or more updates to the document. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests. For example, suppose you call batchUpdate with four updates, and only the third one returns information. The response would have two empty replies, the reply to the third request, and another empty reply, in that order. Because other users may be editing the document, the document might not exactly reflect your changes: your changes may be altered with respect to collaborator changes. If there are no collaborators, the document should reflect your changes. In any case, the updates in your request are guaranteed to be applied together atomically. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
documentId | string | Yes | — | The ID of the document to update. |
requests | object[] | Yes | — | A list of updates to apply to the document. Each request object should contain exactly one operation type (e.g., insertText, insertTable, replaceAllText, deleteContentRange, etc.). |
writeControl | object | No | — | Provides control over how write requests are executed. Optional. |
google_docs_create_document
Creates a blank document using the title given in the request. Other fields in the request, including any provided content, are ignored. Returns the created document. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
title | string | Yes | — | The title of the document to create. |
google_docs_find_and_replace
Find and replace text throughout a Google Docs document. Returns the number of occurrences changed. Uses the batchUpdate API with a replaceAllText request. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
documentId | string | Yes | — | The ID of the Google Docs document |
findText | string | Yes | — | The text to find |
replaceText | string | Yes | — | The text to replace with |
matchCase | boolean | No | — | Whether to match case when searching (default: false) |
google_docs_get_document
Gets the latest version of the specified document. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
documentId | string | Yes | — | The ID of the document to retrieve. |
suggestionsViewMode | string | No | — | The suggestions view mode to apply to the document. This allows viewing the document with all suggestions inline, accepted or rejected. If one is not specified, DEFAULT_FOR_CURRENT_ACCESS is used. |
google_docs_insert_page_break
Insert a page break into a Google Docs document at the specified position. Uses the batchUpdate API with an insertPageBreak request. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
documentId | string | Yes | — | The ID of the document to insert the page break into |
index | number | Yes | — | The zero-based index position in the document to insert the page break at. Use 1 to insert at the beginning of the document body. |
google_docs_insert_table
Insert a table into a Google Docs document at the specified position. Uses the batchUpdate API with an insertTable request. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
documentId | string | Yes | — | The ID of the document to insert the table into |
rows | number | Yes | — | Number of rows in the table (minimum 1) |
columns | number | Yes | — | Number of columns in the table (minimum 1) |
index | number | Yes | — | The zero-based index position in the document to insert the table at. Use 1 to insert at the beginning of the document body. |
google_docs_insert_text
Insert text at a specific location in a Google Docs document. Uses the batchUpdate API with an insertText request. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
documentId | string | Yes | — | The ID of the document to insert text into |
text | string | Yes | — | The text to insert |
index | number | Yes | — | The zero-based index position in the document to insert text at. Use 1 to insert at the beginning of the document body. |
google_docs_list_trigger_capabilities
List available Google Docs trigger types and their configurations. Returns the supported trigger types for document change monitoring.google-docs_poll_trigger
Poll for changes to a specific Google Docs document by checking its current revision against a previous cursor. Returns change events when the document has been modified since the last poll. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Yes | — | Google Docs document URL to monitor (e.g., https://docs.google.com/document/d/DOCUMENT_ID/edit) |
cursor | string | No | — | Last known revision ID for incremental sync |
minTimestamp | number | No | — | Unix timestamp in seconds — used for test polls to verify trigger setup |
maxResults | number | No | — | Maximum number of events to return (default: 100) |

