Skip to main content
Glama

Add conditional format

add_conditional_format

Add conditional formatting rules to Excel ranges to highlight cells based on values, color scales, data bars, or custom formulas.

Instructions

Add a conditional format rule to a range.

Rule types: 'color_scale' (colors: 2 or 3), 'data_bar' (colors: 1), 'cell_value' (operator and values, e.g. greaterThan ['100']), and 'formula' (a formula that is true for highlighted cells, written for the range's top-left cell, e.g. '=$C2>100').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to an .xlsx, .xlsm, .xltx or .xltm file. Relative paths are resolved in the server's workbook directory when one is configured; otherwise use an absolute path.
ruleYes
rangeYesA cell or rectangular range in A1 notation, e.g. 'A1:D20'.
sheetYesWorksheet name, e.g. 'Sheet1'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, non-idempotent mutation that is not destructive, so the safety profile is covered. The description adds a useful behavioral note that formula rules are evaluated relative to the range's top-left cell. It does not say whether an existing rule is replaced or appended, which matters given idempotentHint=false.

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?

Front-loaded with the core action in one sentence, followed by a compact enumeration of rule types. The second sentence is information-dense but every clause (color counts, operator/values, formula anchoring) earns its place.

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

Completeness4/5

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

An output schema exists, so return values need not be described, and annotations cover the mutation profile. The description adequately explains the rule-configuration surface but is silent on usage context and rule-overwrite semantics, the only material gaps for a 4-required-param tool.

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

Parameters4/5

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

With 75% schema description coverage the baseline is 3, and the description genuinely adds value on top: it maps each 'type' to its companion fields and supplies concrete examples ('greaterThan ['100']', '=$C2>100') that the schema leaves abstract. This meaningfully reduces the chance of misconfigured rules.

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 and resource: 'Add a conditional format rule to a range.' This is unambiguous about what gets created and where. It does not, however, contrast itself with the sibling format_range (static formatting), so it is clear but leaves sibling differentiation to inference.

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

Usage Guidelines2/5

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

There is no guidance on when to reach for this tool versus format_range or add_data_validation, nor any stated prerequisites. The rule-type breakdown explains how to configure a given call rather than when to make it, so it does not satisfy the 'when to use vs alternatives' burden.

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