format_cells
Apply formatting to a Google Sheets cell range—font styles, colors, alignment, and number formats—to make spreadsheet data clear and readable.
Instructions
Apply formatting to a cell range (background color, font, alignment, number format).
Args: spreadsheet_id: The ID of the spreadsheet sheet: The name of the sheet range: A1 notation range to format (e.g. "A1:D5") bold: Set bold text italic: Set italic text strikethrough: Set strikethrough font_size: Font size in points font_color: RGB color dict, e.g. {"red": 1.0, "green": 0.0, "blue": 0.0} background_color: RGB color dict for cell background horizontal_alignment: "LEFT", "CENTER", or "RIGHT" vertical_alignment: "TOP", "MIDDLE", or "BOTTOM" number_format_type: "TEXT", "NUMBER", "PERCENT", "CURRENCY", "DATE", "TIME", "DATE_TIME", "SCIENTIFIC" number_format_pattern: Custom number format pattern, e.g. "#,##0.00"
Returns: Result of the batchUpdate operation
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": {
"spreadsheet_id": "<spreadsheet_id>",
"sheet": "<sheet>",
"range": "<range>"
},
"name": "format_cells"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bold | No | ||
| range | Yes | ||
| sheet | Yes | ||
| italic | No | ||
| font_size | No | ||
| font_color | No | ||
| strikethrough | No | ||
| spreadsheet_id | Yes | ||
| background_color | No | ||
| number_format_type | No | ||
| vertical_alignment | No | ||
| horizontal_alignment | No | ||
| number_format_pattern | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||