gws.docs.insert_text
Insert literal text into a Google Doc at the end or a specified position. Use to append content or add text at an exact index without regex. Confirm before modifying documents you did not create.
Instructions
Insert literal text into a Google Doc. location is 'end' (append to document body) or a positive 1-based integer index. No regex — text is inserted literally. This tool irreversibly modifies user content. Confirm intent with the user before calling it on documents you did not create in this session.
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>",
"text": "<text>"
},
"name": "gws.docs.insert_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to insert | |
| account | No | Account label or email. Uses default if omitted. | |
| location | No | 'end' (default) or a 1-based integer index | |
| document_id | Yes | The document ID |