Skip to main content
Glama

Add conditional format

add_conditional_format

Add conditional formatting to an Excel range to highlight values, formulas, text, dates, averages, duplicates, or icons. Rules apply in priority order; first match wins.

Instructions

Add a conditional format rule to a range. Rules apply in priority order (default: last); of conflicting formats the first rule met wins.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
ruleYes
rangeYes
sheetYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed71 schema fields changedv2.0.0
    • changedInput schema / $defs / ConditionalFormat / description
      Previous value: -"A conditional format rule. Which fields are used depends on ``type``."New value: +"Fields apply per `type`."
    • addedInput schema / $defs / ConditionalFormat / properties / axis
      Added value: +{
      +  "default": "none",
      +  "description": "data_bar: where negative bars start.",
      +  "enum": [
      +    "automatic",
      +    "middle",
      +    "none"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / axis_color
      Added value: +{
      +  "description": "data_bar.",
      +  "type": "string"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / bar_direction
      Added value: +{
      +  "default": "context",
      +  "description": "data_bar.",
      +  "enum": [
      +    "context",
      +    "left_to_right",
      +    "right_to_left"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / bar_fill
      Added value: +{
      +  "default": "gradient",
      +  "description": "data_bar.",
      +  "enum": [
      +    "gradient",
      +    "solid"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / border_color
      Added value: +{
      +  "description": "data_bar.",
      +  "type": "string"
      +}
    • removedInput schema / $defs / ConditionalFormat / properties / colors / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / $defs / ConditionalFormat / properties / colors / default
      Removed value: -null
    • changedInput schema / $defs / ConditionalFormat / properties / colors / description
      Previous value: -"color_scale: 2 or 3 colors from lowest to highest. data_bar: 1 color."New value: +"color_scale: 2 or 3, lowest first. data_bar: 1."
    • addedInput schema / $defs / ConditionalFormat / properties / colors / items
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / $defs / ConditionalFormat / properties / colors / title
      Removed value: -"Colors"
    • addedInput schema / $defs / ConditionalFormat / properties / colors / type
      Added value: +"array"
    • addedInput schema / $defs / ConditionalFormat / properties / count
      Added value: +{
      +  "description": "top, bottom (1-100 if percent).",
      +  "maximum": 1000,
      +  "type": "integer"
      +}
    • removedInput schema / $defs / ConditionalFormat / properties / fill_color / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / $defs / ConditionalFormat / properties / fill_color / default
      Removed value: -null
    • changedInput schema / $defs / ConditionalFormat / properties / fill_color / description
      Previous value: -"cell_value and formula rules."New value: +"Not for scales and icons."
    • removedInput schema / $defs / ConditionalFormat / properties / fill_color / title
      Removed value: -"Fill Color"
    • addedInput schema / $defs / ConditionalFormat / properties / fill_color / type
      Added value: +"string"
    • removedInput schema / $defs / ConditionalFormat / properties / font_color / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / $defs / ConditionalFormat / properties / font_color / default
      Removed value: -null
    • changedInput schema / $defs / ConditionalFormat / properties / font_color / description
      Previous value: -"cell_value and formula rules."New value: +"Like fill_color."
    • removedInput schema / $defs / ConditionalFormat / properties / font_color / title
      Removed value: -"Font Color"
    • addedInput schema / $defs / ConditionalFormat / properties / font_color / type
      Added value: +"string"
    • removedInput schema / $defs / ConditionalFormat / properties / formula / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / $defs / ConditionalFormat / properties / formula / default
      Removed value: -null
    • changedInput schema / $defs / ConditionalFormat / properties / formula / description
      Previous value: -"formula only: true for highlighted cells, e.g. '=$C2>100'."New value: +"formula: for the range's top-left cell, e.g. '=$C2>100'."
    • removedInput schema / $defs / ConditionalFormat / properties / formula / title
      Removed value: -"Formula"
    • addedInput schema / $defs / ConditionalFormat / properties / formula / type
      Added value: +"string"
    • addedInput schema / $defs / ConditionalFormat / properties / hide_values
      Added value: +{
      +  "description": "icon_set, data_bar.",
      +  "type": "boolean"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / icon_set
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "3Arrows",
      +        "3ArrowsGray",
      +        "3Flags",
      +        "3TrafficLights1",
      +        "3TrafficLights2",
      +        "3Signs",
      +        "3Symbols",
      +        "3Symbols2",
      +        "4Arrows",
      +        "4ArrowsGray",
      +        "4RedToBlack",
      +        "4Rating",
      +        "4TrafficLights",
      +        "5Arrows",
      +        "5ArrowsGray",
      +        "5Rating",
      +        "5Quarters"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "enum": [
      +        "3Stars",
      +        "3Triangles",
      +        "5Boxes"
      +      ],
      +      "type": "string"
      +    }
      +  ],
      +  "description": "icon_set."
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / icons
      Added value: +{
      +  "description": "icon_set: a custom icon per range, lowest first, e.g. '3Arrows:1' (the set's lowest icon) or 'none'. Sets can be mixed.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / include_equal
      Added value: +{
      +  "description": "above/below_average.",
      +  "type": "boolean"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / max_type
      Added value: +{
      +  "default": "highest",
      +  "description": "data_bar: the longest bar.",
      +  "enum": [
      +    "automatic",
      +    "lowest",
      +    "highest",
      +    "number",
      +    "percent",
      +    "percentile",
      +    "formula"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / max_value
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "string"
      +    }
      +  ],
      +  "description": "data_bar."
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / min_type
      Added value: +{
      +  "default": "lowest",
      +  "description": "data_bar: the shortest bar.",
      +  "enum": [
      +    "automatic",
      +    "lowest",
      +    "highest",
      +    "number",
      +    "percent",
      +    "percentile",
      +    "formula"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / min_value
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "string"
      +    }
      +  ],
      +  "description": "data_bar: for min_type number, percent, percentile or formula."
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / negative_border_color
      Added value: +{
      +  "description": "data_bar. Default: border_color.",
      +  "type": "string"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / negative_color
      Added value: +{
      +  "description": "data_bar. Default: as `colors`.",
      +  "type": "string"
      +}
    • removedInput schema / $defs / ConditionalFormat / properties / operator / anyOf
      Removed value: -[
      -  {
      -    "enum": [
      -      "between",
      -      "notBetween",
      -      "equal",
      -      "notEqual",
      -      "greaterThan",
      -      "lessThan",
      -      "greaterThanOrEqual",
      -      "lessThanOrEqual"
      -    ],
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / $defs / ConditionalFormat / properties / operator / default
      Removed value: -null
    • changedInput schema / $defs / ConditionalFormat / properties / operator / description
      Previous value: -"cell_value only."New value: +"cell_value."
    • addedInput schema / $defs / ConditionalFormat / properties / operator / enum
      Added value: +[
      +  "between",
      +  "notBetween",
      +  "equal",
      +  "notEqual",
      +  "greaterThan",
      +  "lessThan",
      +  "greaterThanOrEqual",
      +  "lessThanOrEqual"
      +]
    • removedInput schema / $defs / ConditionalFormat / properties / operator / title
      Removed value: -"Operator"
    • addedInput schema / $defs / ConditionalFormat / properties / operator / type
      Added value: +"string"
    • addedInput schema / $defs / ConditionalFormat / properties / percent
      Added value: +{
      +  "description": "top, bottom.",
      +  "type": "boolean"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / period
      Added value: +{
      +  "description": "date.",
      +  "enum": [
      +    "yesterday",
      +    "today",
      +    "tomorrow",
      +    "last7Days",
      +    "lastWeek",
      +    "thisWeek",
      +    "nextWeek",
      +    "lastMonth",
      +    "thisMonth",
      +    "nextMonth"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / priority
      Added value: +{
      +  "description": "1 is first; rules at or below move down. Default: last.",
      +  "type": "integer"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / reverse
      Added value: +{
      +  "description": "icon_set.",
      +  "type": "boolean"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / std_dev
      Added value: +{
      +  "description": "above/below_average.",
      +  "maximum": 3,
      +  "type": "integer"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / stop_if_true
      Added value: +{
      +  "description": "Skip later rules if met.",
      +  "type": "boolean"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / text
      Added value: +{
      +  "description": "contains_text etc.",
      +  "maxLength": 255,
      +  "type": "string"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / threshold_type
      Added value: +{
      +  "default": "percent",
      +  "description": "icon_set.",
      +  "enum": [
      +    "percent",
      +    "number",
      +    "percentile"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / $defs / ConditionalFormat / properties / thresholds
      Added value: +{
      +  "description": "icon_set: where icons 2..n start, lowest first. Default: equal shares.",
      +  "items": {
      +    "type": "number"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / $defs / ConditionalFormat / properties / type / description
      Previous value: -"Kind of rule."New value: +"top/bottom: `count` highest or lowest. date: dates in a `period`."
    • changedInput schema / $defs / ConditionalFormat / properties / type / enum
      Previous value: -[
      -  "color_scale",
      -  "data_bar",
      -  "cell_value",
      -  "formula"
      -]New value: +[
      +  "color_scale",
      +  "data_bar",
      +  "icon_set",
      +  "cell_value",
      +  "formula",
      +  "top",
      +  "bottom",
      +  "above_average",
      +  "below_average",
      +  "duplicate",
      +  "unique",
      +  "contains_text",
      +  "not_contains_text",
      +  "begins_with",
      +  "ends_with",
      +  "date",
      +  "blanks",
      +  "no_blanks",
      +  "errors",
      +  "no_errors"
      +]
    • removedInput schema / $defs / ConditionalFormat / properties / type / title
      Removed value: -"Type"
    • removedInput schema / $defs / ConditionalFormat / properties / values / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / $defs / ConditionalFormat / properties / values / default
      Removed value: -null
    • changedInput schema / $defs / ConditionalFormat / properties / values / description
      Previous value: -"cell_value only: 1 value, or 2 for between/notBetween. Numbers, quoted text such as '\"Done\"', or formulas."New value: +"cell_value: 1, or 2 for between. Numbers, quoted text '\"Done\"' or formulas."
    • addedInput schema / $defs / ConditionalFormat / properties / values / items
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / $defs / ConditionalFormat / properties / values / title
      Removed value: -"Values"
    • addedInput schema / $defs / ConditionalFormat / properties / values / type
      Added value: +"array"
    • removedInput schema / $defs / ConditionalFormat / title
      Removed value: -"ConditionalFormat"
    • removedInput schema / properties / path / description
      Removed value: -"Path 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."
    • removedInput schema / properties / path / title
      Removed value: -"Path"
    • removedInput schema / properties / range / description
      Removed value: -"A cell or rectangular range in A1 notation, e.g. 'A1:D20'."
    • removedInput schema / properties / range / title
      Removed value: -"Range"
    • removedInput schema / properties / sheet / description
      Removed value: -"Worksheet name, e.g. 'Sheet1'."
    • removedInput schema / properties / sheet / title
      Removed value: -"Sheet"
    • removedInput schema / title
      Removed value: -"add_conditional_formatArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "add_conditional_formatOutput",
      -  "type": "object"
      -}New value: +null
  2. Addedv1.1.1

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and idempotentHint=false, so the safety profile is known. The description adds genuinely non-obvious behavioral context: rules apply in priority order (default last) and the first matching rule wins on conflict. It does not say the workbook file must already exist or that the change is persisted, so it stops short of full disclosure.

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

Conciseness5/5

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

Two tightly written sentences with zero filler, and the core action plus the priority-conflict semantics are front-loaded.

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?

For a mutation tool with a large nested schema and no output schema, the description covers the key ordering semantics but omits file prerequisites, reversibility, and how to remove or override an existing rule. Combined with the annotations' safety flags it is minimally adequate, not complete.

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?

Top-level schema coverage is 0% – path, sheet, range, and rule have no schema descriptions – and the description only alludes to 'a range' without clarifying any parameter. The heavily annotated nested ConditionalFormat subschema partly compensates by documenting every rule field per type, so an agent can still construct a valid rule, but the description itself contributes essentially nothing.

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?

The description states a specific verb+resource ('Add a conditional format rule to a range'), so the agent knows exactly what the tool does. It does not, however, distinguish itself from plausible siblings like format_range or add_data_validation, leaving that differentiation to the schema.

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 explicit when-to-use guidance, no prerequisites, and no named alternative. The priority-ordering sentence describes rule behavior rather than when to pick this tool over format_range or add_data_validation.

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