Replace All Text in Google Doc
docs_replace_all_textReplace all occurrences of text in a Google Doc, maintaining formatting, to fill template placeholders.
Instructions
Find-and-replace text across a Google Doc (documents.batchUpdate with one replaceAllText request per item). Preserves surrounding formatting, so it is the safest way to fill placeholders in a template document.
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": {
"user_google_email": "<user_google_email>",
"documentId": "<documentId>",
"replacements": "<replacements>"
},
"name": "docs_replace_all_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| matchCase | No | Default case-sensitivity for items that don't set their own. Defaults to True. | |
| documentId | Yes | Target document id. | |
| replacements | Yes | List of {"find": str, "replace": str} dicts. Each may override the default case behavior with its own "matchCase". | |
| user_google_email | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||