sheets_add_conditional_formatting
Add conditional formatting rules to a spreadsheet range to highlight cells that meet criteria like greater than, less than, or text contains.
Instructions
Adds a conditional formatting rule to a range in a spreadsheet
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>",
"range": "<range>",
"rule_type": "<rule_type>"
},
"name": "sheets_add_conditional_formatting"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | The A1 notation range to apply formatting to | |
| format | No | Cell format to apply when condition is met | |
| values | No | Condition values (e.g. threshold numbers, text to match, formula) | |
| rule_type | Yes | The type of conditional formatting rule | |
| color_scale | No | Color scale configuration (only used when rule_type is color_scale) | |
| spreadsheet_id | Yes | The ID of the spreadsheet |