Skip to main content
Glama

add_conditional_format

Adds a conditional formatting rule to a worksheet range using cell-value comparisons, color scales, data bars, or icon sets to highlight data automatically.

Instructions

Add a conditional formatting rule to a range. Supports cellValue (compare with a formula and fill on match), colorScale (min/max gradient), dataBar, and iconSet rules.

Input Schema

NameRequiredDescriptionDefault
rangeYesA1 range address.
formula1NocellValue: comparison value/formula, e.g. "0" or "=TODAY()".
formula2NocellValue: second bound for Between/NotBetween.
maxColorNocolorScale: maximum color. Default "#63BE7B".
minColorNocolorScale: minimum color. Default "#F8696B".
operatorNocellValue: comparison operator.
ruleTypeYesType of rule.
fillColorNocellValue: fill color on match, as #RRGGBB. Default "#FFC7CE".
sheetNameNoWorksheet name. Defaults to the active worksheet.
workbookIdNoTarget workbook ID from list_workbooks. Optional when only one workbook is connected.
iconSetStyleNoiconSet: icon set style. Default ThreeTrafficLights1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It does disclose what each rule type does conceptually (cellValue compares via formula and fills on match, colorScale is a min/max gradient), but says nothing about whether existing rules are replaced or appended, rule priority/order, permission requirements, or what is returned after the add.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences with the core action front-loaded and the rule-type enumeration immediately after; no filler. It omits required-field note but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 11 parameters, no annotations, and no output schema, the definition is adequate but thin: it never addresses defaults behavior, whether the new rule is appended to existing ones, or what the agent gets back. The high schema coverage compensates for the parameter side but not for the mutation semantics.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already prefixes each parameter with its applicable rule type (formula1/operator/fillColor for cellValue, minColor/maxColor for colorScale), so the description's grouping adds no information beyond the structured fields. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ("Add a conditional formatting rule to a range") and enumerates the four rule types it supports, which lets an agent distinguish it from format_range or set_data_validation. It does not explicitly name a sibling or exclusion, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied by the tool name and the rule-type list; there is no statement of when to prefer this over format_range, or when a static format is the better choice. No prerequisites (e.g., workbook must be connected, rule precedence) are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.