getFormatting
Retrieves text and paragraph styling for a Google Docs range or matched text, returning per-run fonts, colors, bold/italic plus alignment, headings, spacing and indentation.
Instructions
Returns the text styling (bold, italic, font, colors, etc.) and paragraph styling (alignment, headings, spacing, indentation) for a specific range or found text in a Google Doc. Returns per-run text styles and per-paragraph styles, so mixed formatting (e.g. bold + italic spans) is fully represented.
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": "getFormatting"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | The ID of the specific tab to read from. If not specified, reads from the first tab. | |
| target | Yes | Target by range indices or text search. | |
| documentId | Yes | The document ID — the long string between /d/ and /edit in a Google Docs URL. |