gws-mcp__docs_batch_update
Apply batch updates to a Google Doc. Supports inserting text, replacing text, deleting content ranges, and other document modifications. Uses the Google Docs API batchUpdate format.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"document_id": "<document_id>",
"requests": "<requests>"
},
"name": "gws-mcp__docs_batch_update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Optional email address of the connected account to use (e.g. 'user@gmail.com'). If omitted, the default account is used. | |
| requests | Yes | Array of Google Docs API request objects, applied in order. Common shapes, with the nesting exactly as the API requires: insertText { insertText: { location: { index: 1 }, text: "Hello" } }; replaceAllText { replaceAllText: { containsText: { text: "old", matchCase: true }, replaceText: "new" } } — note matchCase sits INSIDE containsText, never at the top level of replaceAllText; deleteContentRange { deleteContentRange: { range: { startIndex: 1, endIndex: 10 } } }; updateTextStyle { updateTextStyle: { range: { startIndex: 1, endIndex: 10 }, textStyle: { bold: true }, fields: "bold" } } — fields is required and names which textStyle properties to apply. Indices are the character positions docs_get mode "index" reports. | |
| document_id | Yes | The Google Docs document ID |