appendText
Append plain text to the end of a Google Doc, adding a newline when needed. Use it to add unformatted content without rewriting existing text.
Instructions
Appends plain text to the end of a document. For formatted content, use appendMarkdown instead. To edit existing content, use modifyText (single-location) or replaceDocumentWithMarkdown (section/full rewrite). Appended text carries the document's default text color explicitly, when the document defines one.
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": {
"documentId": "<documentId>"
},
"name": "appendText"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | The plain text to append to the end of the document. For content longer than ~2000 characters, prefer writing to a local file first and passing filePath instead. | |
| tabId | No | The ID of the specific tab to append to. If not specified, appends to the first tab (or legacy document.body for documents without tabs). | |
| filePath | No | Path to a local text file to use as content. Takes precedence over the text parameter. | |
| documentId | Yes | The document ID — the long string between /d/ and /edit in a Google Docs URL. | |
| readHandle | No | Capability returned by a previous readDocument call for this document (and tab). Required over HTTP on the 2026-07-28 runtime: it authorizes the write and pins it to the revision that read saw. Omit it on stdio to use that connection's most recent read. | |
| addNewlineIfNeeded | No | Automatically add a newline before the appended text if the doc doesn't end with one. |