files_set_conditional_format
Adds (or replaces) a formula-based conditional formatting rule on a range: cells where the formula evaluates truthy get the given style. The formula is a spreadsheet formula referencing cells relative to the top-left of the range (like Excel conditional formatting), e.g. 'A1>100', 'ISBLANK(A1)', 'A1="done"'. At least one style property must be set. Pass 'id' (from files_conditional_formats) to replace that existing rule instead of creating a new one — omit it to create a new rule. Requires edit permission; does not change values. Signature: files_set_conditional_format(file_uuid, range, formula, sheet?, id?, bold?, italic?, underline?, strikethrough?, text_color?, fill_color?, apply_to_blank?).
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": {
"file_uuid": "<file_uuid>",
"range": "<range>",
"formula": "<formula>"
},
"name": "files_set_conditional_format"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Existing rule id (from files_conditional_formats) to replace; omit to create a new rule. | |
| bold | No | ||
| range | Yes | A1 range the rule applies to, e.g. 'A1:A100'. | |
| sheet | No | Sheet name (defaults to the first sheet). | |
| italic | No | ||
| formula | Yes | Condition formula; cells where it is truthy get the style. References are relative to the range's top-left. English and Russian notation are both accepted, as in files_set_formula. | |
| file_uuid | Yes | ||
| underline | No | ||
| fill_color | No | Hex background color. | |
| text_color | No | Hex text color, e.g. '#B00020'. | |
| strikethrough | No | ||
| apply_to_blank | No | Apply the rule to blank cells too (default: rule-type default). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | ||
| file_uuid | Yes | ||
| sequence_number | Yes |