Skip to main content
Server path: /google-docs | Type: Application | PCID required: Yes

Tools

ToolDescription
google_docs_batch_updateApplies 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_documentCreates 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_replaceFind 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_documentGets the latest version of the specified document.
google_docs_insert_page_breakInsert a page break into a Google Docs document at the specified position. Uses the batchUpdate API with an insertPageBreak request.
google_docs_insert_tableInsert a table into a Google Docs document at the specified position. Uses the batchUpdate API with an insertTable request.
google_docs_insert_textInsert text at a specific location in a Google Docs document. Uses the batchUpdate API with an insertText request.
google_docs_list_trigger_capabilitiesList available Google Docs trigger types and their configurations. Returns the supported trigger types for document change monitoring.
google-docs_poll_triggerPoll 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:
ParameterTypeRequiredDefaultDescription
documentIdstringYesThe ID of the document to update.
requestsobject[]YesA list of updates to apply to the document. Each request object should contain exactly one operation type (e.g., insertText, insertTable, replaceAllText, deleteContentRange, etc.).
writeControlobjectNoProvides 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:
ParameterTypeRequiredDefaultDescription
titlestringYesThe 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:
ParameterTypeRequiredDefaultDescription
documentIdstringYesThe ID of the Google Docs document
findTextstringYesThe text to find
replaceTextstringYesThe text to replace with
matchCasebooleanNoWhether to match case when searching (default: false)

google_docs_get_document

Gets the latest version of the specified document. Parameters:
ParameterTypeRequiredDefaultDescription
documentIdstringYesThe ID of the document to retrieve.
suggestionsViewModestringNoThe 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:
ParameterTypeRequiredDefaultDescription
documentIdstringYesThe ID of the document to insert the page break into
indexnumberYesThe 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:
ParameterTypeRequiredDefaultDescription
documentIdstringYesThe ID of the document to insert the table into
rowsnumberYesNumber of rows in the table (minimum 1)
columnsnumberYesNumber of columns in the table (minimum 1)
indexnumberYesThe 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:
ParameterTypeRequiredDefaultDescription
documentIdstringYesThe ID of the document to insert text into
textstringYesThe text to insert
indexnumberYesThe 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:
ParameterTypeRequiredDefaultDescription
urlstringYesGoogle Docs document URL to monitor (e.g., https://docs.google.com/document/d/DOCUMENT_ID/edit)
cursorstringNoLast known revision ID for incremental sync
minTimestampnumberNoUnix timestamp in seconds — used for test polls to verify trigger setup
maxResultsnumberNoMaximum number of events to return (default: 100)