apply_text_style
Apply character-level formatting to text in Google Docs by specifying a range or searching for text. Format options include bold, italic, color, font, and links.
Instructions
Apply character-level formatting (bold, color, font, etc.) to text.
Target can be specified either by:
Range: Provide start_index and end_index
Text search: Provide text_to_find and optionally match_instance
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": {
"document_id": "<document_id>"
},
"name": "apply_text_style"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | The ID of the Google Document | |
| bold | No | ||
| italic | No | ||
| underline | No | ||
| strikethrough | No | ||
| font_size | No | ||
| font_family | No | ||
| foreground_color | No | ||
| background_color | No | ||
| link_url | No | ||
| start_index | No | ||
| end_index | No | ||
| text_to_find | No | ||
| match_instance | No | Which instance of text to target (1st, 2nd, etc.) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |