format_cells
Apply formatting such as bold, colors, number formats, font size, and alignment to a range of cells in a Google Sheets spreadsheet.
Instructions
Apply formatting to a range of cells (bold, color, number format, alignment)
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": {
"spreadsheetId": "<spreadsheetId>",
"sheetId": "<sheetId>",
"startRow": "<startRow>",
"endRow": "<endRow>",
"startCol": "<startCol>",
"endCol": "<endCol>"
},
"name": "format_cells"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bold | No | Set text bold | |
| endCol | Yes | End column index (exclusive, 0-based) | |
| endRow | Yes | End row index (exclusive, 0-based) | |
| italic | No | Set text italic | |
| sheetId | Yes | The numeric sheet ID (from list_sheets) | |
| fontSize | No | Font size in points | |
| startCol | Yes | Start column index (0-based) | |
| startRow | Yes | Start row index (0-based) | |
| numberFormat | No | Number format | |
| spreadsheetId | Yes | The ID of the spreadsheet | |
| backgroundColor | No | Background color as RGB (0-1 range) | |
| foregroundColor | No | Text color as RGB (0-1 range) | |
| horizontalAlignment | No | Horizontal alignment |