Format cells
format_cellsApply targeted formatting to a Google Sheets range—bold, italic, font size, text/background colors, alignment, wrapping, and number formats—while changing only the specified options.
Instructions
Apply formatting to a range: bold/italic, font size, text and background color, alignment, wrapping, and number format. Only the options you pass are changed.
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>",
"range": "<range>"
},
"name": "format_cells"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bold | No | ||
| wrap | No | ||
| range | Yes | A1 range to format, e.g. "A1:F1" | |
| sheet | No | Sheet (tab) name; defaults to the first sheet | |
| italic | No | ||
| fontSize | No | ||
| textColor | No | ||
| numberFormat | No | Number format pattern, e.g. "#,##0.00", "0.0%", "$#,##0", "yyyy-mm-dd" | |
| spreadsheetId | Yes | Spreadsheet ID or full Google Sheets URL | |
| backgroundColor | No | ||
| horizontalAlign | No |