Style paragraphs
style_paragraphFormat paragraphs by applying headings, alignment, line spacing, indents, and spacing to a selected range. Only specified properties change, enabling precise document styling.
Instructions
Applies paragraph formatting to every paragraph overlapping [start_index, end_index): named_style (normal_text, title, subtitle, heading_1..heading_6 — the way to make headings), alignment (start/center/end/justified), line_spacing (100 = single, 200 = double), space_above/space_below (points), indent_start/indent_end/indent_first_line (points), keep_with_next and direction (ltr/rtl). Only the provided fields change; at least one is required. A range inside a single paragraph styles that whole paragraph.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab_id | No | Tab to target (from list_tabs). Omit for the first/only tab. | |
| alignment | No | Text alignment. | |
| direction | No | Content direction. | |
| end_index | Yes | End of the paragraph range (exclusive). | |
| indent_end | No | Indent from the end edge, points. | |
| segment_id | No | Header/footer/footnote segment id (from get_document). Omit for the document body. | |
| document_id | Yes | The document id — the long id from the document URL (docs.google.com/document/d/<documentId>/edit) or from create_document output. | |
| named_style | No | Named paragraph style — headings feed the document outline. | |
| space_above | No | Extra space above the paragraph, points. | |
| space_below | No | Extra space below the paragraph, points. | |
| start_index | Yes | Start of the paragraph range (inclusive). | |
| indent_start | No | Indent from the start edge, points. | |
| line_spacing | No | 100 = single spacing, 200 = double. | |
| keep_with_next | No | Keep on the same page as the next paragraph. | |
| indent_first_line | No | First-line indent, points. |