Replace words in a Google Doc
replace_text_in_google_docChange every place some exact words appear in a Google Doc to other words — a name, a price, a date. Returns how many places changed; 0 means the words weren't found and nothing changed. Read the document first if you aren't sure of the exact wording.
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": {
"mailbox": "<mailbox>",
"documentId": "<documentId>",
"find": "<find>",
"replaceWith": "<replaceWith>"
},
"name": "replace_text_in_google_doc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find | Yes | The exact words to find | |
| mailbox | Yes | Email address of the connected Gmail/Google Workspace mailbox to act on. Call list_authorized_mailboxes to see available options. | |
| matchCase | No | Only where the capitals match too. Default false. | |
| documentId | Yes | The Google Doc's id, from search_gdrive_items or list_gdrive_items | |
| replaceWith | Yes | What to put in their place (empty removes them) |