appendMarkdown
Append formatted Markdown content to the end of a Google Doc. Adds headings, lists, tables, links, and text styling, while reporting unsupported elements as warnings.
Instructions
Best for adding new formatted content to the end of a document. Supports headings, bold, italic, strikethrough, links, tables, bullet/numbered lists, and rich markdown HTML extensions for underline, color, highlight, font, alignment, and blockquotes. Does not support markdown images or raw HTML outside those listed extensions; unsupported content is omitted and reported as warnings in the result. Use insertImage for images. Use this instead of appendText when you need formatting. To edit existing content, use modifyText (single-location) or replaceDocumentWithMarkdown (section/full rewrite). Inserted 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": "appendMarkdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | The ID of the specific tab to append to. If not specified, appends to the first tab. | |
| filePath | No | Path to a local markdown file to use as content. Takes precedence over the markdown parameter. | |
| markdown | No | The markdown content to append. For content longer than ~2000 characters, prefer writing to a local file first and passing filePath instead. | |
| 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 | Add spacing before appended content if needed. | |
| firstHeadingAsTitle | No | If true, the first H1 heading (# ...) in the markdown is styled as a Google Docs TITLE instead of Heading 1. Useful when the markdown represents a full document whose first line is the document title. |