Insert text
docs_insertInsert text into Google Docs at an index, at the end, or before/after existing text; back-to-front batching prevents index shifts, and dry-run previews requests.
Instructions
Insert text at an index, at the end of the body, or before/after existing text. Several insertions are applied back-to-front in one batch so earlier ones cannot shift the indices later ones rely on. Supports dryRun.
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": "<document>",
"insertions": "<insertions>"
},
"name": "docs_insert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab | No | Tab id or title, for documents with several tabs. Reads default to the first tab; writes to a multi-tab document REQUIRE this rather than guessing. Get ids from docs_describe. | |
| dryRun | No | Return the exact requests that would be sent, in the order they would be applied, and send nothing. | |
| account | No | Google account to act as. Optional when one is authorised or a default is set. | |
| document | Yes | Document URL or file id. Both accepted. | |
| insertions | Yes | Text insertions. Applied back-to-front so earlier ones cannot shift later indices. |