apply_conditional_formatting
Add conditional formatting to a cell range using color scales, data bars, value-based conditions, or formulas to highlight data automatically.
Instructions
Add a conditional formatting rule to a range.
rule_type:
'color_scale': gradient by value; colors = 2 or 3 hex/named colors (default red-yellow-green).
'data_bar': in-cell bars; colors = [bar_color] (default blue).
'cell_value': highlight cells matching operator (greaterThan, lessThan, equal, notEqual, between, notBetween, greaterThanOrEqual, lessThanOrEqual) against values (two values for between); uses fill_color/font_color.
'formula': highlight where an Excel formula (relative to the range's top-left cell) is TRUE, e.g. 'ISBLANK(A2)'; uses fill_color/font_color.
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": {
"session_id": "<session_id>",
"range": "<range>",
"rule_type": "<rule_type>"
},
"name": "apply_conditional_formatting"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | ||
| colors | No | ||
| values | No | ||
| formula | No | ||
| operator | No | ||
| rule_type | Yes | ||
| fill_color | No | light_red | |
| font_color | No | ||
| session_id | Yes |