Update Doc
update_documentUpdate an existing Google Doc. Supports replacing all content or appending to it. The result reports the mode that was actually applied and how many characters were written, so you can confirm a replace was a replace.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Write mode: 'replace' clears and replaces all content, 'append' adds to the end. Defaults to 'replace' when omitted. Matched case-insensitively; any other value is rejected. The result reports the mode actually applied — check it. | |
| content | Yes | Text content to write | |
| document_id | Yes | The document ID to update |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Link that opens the document in Google Docs — give this to the user | |
| mode | Yes | The write mode actually applied: 'replace' or 'append'. Compare this against what you asked for. | |
| status | Yes | 'ok' when the write landed; 'not_shared' when Google would not acknowledge the document — nothing was written, and the result text says how to recover | |
| document_id | Yes | The document that was written | |
| chars_written | Yes | Number of characters written, counted in runes rather than bytes |