applyParagraphStyle
Apply paragraph-level formatting—alignment, spacing, heading styles, and list depth—to Google Docs paragraphs targeted by character range, text search, or an index within the paragraph.
Instructions
Applies paragraph-level formatting (alignment, spacing, heading styles) to paragraphs identified by a character range or by searching for text. Use namedStyleType to set heading levels (HEADING_1 through HEADING_6). Pass bulletNestingLevel (0-8) to set a paragraph's list depth explicitly — the target must resolve to whole paragraphs; the bullet style is inferred from the existing list, or set it with bulletPreset for paragraphs that are not yet list items.
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>",
"target": "<target>"
},
"name": "applyParagraphStyle"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | The paragraph styling to apply. Optional when bulletNestingLevel is provided. | |
| tabId | No | The ID of the specific tab to apply formatting in. Use listDocumentTabs to get tab IDs. If not specified, operates on the first tab. | |
| target | Yes | Specify the target paragraph either by start/end indices, by finding text within it, or by providing an index within it. | |
| 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. | |
| bulletPreset | No | Bullet glyph preset to use when setting bulletNestingLevel on paragraphs that are not already list items (e.g. "BULLET_DISC_CIRCLE_SQUARE", "NUMBERED_DECIMAL_ALPHA_ROMAN"). Ignored without bulletNestingLevel. When the paragraphs already belong to a list, the existing list's style is reused unless this is set. | |
| bulletNestingLevel | No | Sets the target paragraph(s) list nesting depth explicitly (0 = top level). The target must resolve to whole paragraphs and, if it spans more than one, they must all belong to the same list (or none). Emits deleteParagraphBullets, leading-tab adjustment, and createParagraphBullets in one batchUpdate. For a paragraph that is not already a list item, any leading tab characters in its text are treated as its current nesting level (they are what createParagraphBullets itself would consume into nesting), so the tab count changed here is relative to that existing count, not zero. |