add_conditional_format
Add a conditional formatting rule to a Google Sheets range using condition types like NUMBER_GREATER, TEXT_CONTAINS, or CUSTOM_FORMULA, with optional formatting changes.
Instructions
Add a boolean conditional-format rule to an A1 range.
condition_type is a Sheets ConditionType such as NUMBER_GREATER,
NUMBER_LESS, NUMBER_BETWEEN, TEXT_CONTAINS, TEXT_EQ,
CUSTOM_FORMULA, BLANK, NOT_BLANK. values supplies the
comparison operands (e.g. ["100"] or ["10","20"]; for
CUSTOM_FORMULA a single ["=$A1>5"]). The format applies when the
condition is true.
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>",
"condition_type": "<condition_type>"
},
"name": "add_conditional_format"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bold | No | ||
| range | Yes | ||
| values | No | ||
| text_color | No | ||
| condition_type | Yes | ||
| spreadsheet_id | Yes | ||
| background_color | No |