docs_replace
Find and replace across a whole Google Doc while keeping surrounding formatting; returns the number of matches replaced.
Instructions
Find and replace across a whole Google Doc using Docs' own Find and replace (keeps surrounding formatting). Returns how many were replaced.
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": {
"doc": "<doc>",
"find": "<find>",
"replace": "<replace>"
},
"name": "docs_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | Yes | Google Docs URL or document id. | |
| find | Yes | ||
| regex | No | Treat find as a regular expression (Docs/RE2 syntax). Default false. | |
| account | No | Which signed-in Google account to use: an index as in /u/N/ URLs (0 = first account) or an email address. Omit for the browser default. Use this for documents owned by a second (e.g. school) account. | |
| replace | Yes | Replacement text (plain). Empty string deletes every match. | |
| matchCase | No | Default false. |