Skip to main content
Glama

Add conditional formatting

add_conditional_format

Apply conditional formatting rules to Google Sheets ranges using numeric, text, date, blank, or custom formula conditions, or color scales.

Instructions

Add a conditional formatting rule: either a condition (e.g. NUMBER_GREATER, TEXT_CONTAINS, CUSTOM_FORMULA) with a style, or a color scale.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rangeYesA1 range, e.g. "Sheet1!A1:D20", "'My Tab'!B:B", or a tab name
accountNoGoogle account to use: an email or unique part of one (e.g. "acme.com"). Default: the account that can open the spreadsheet, else the default account.
conditionNo
color_scaleNo
spreadsheetYesGoogle Sheets link or spreadsheet ID. The name of a spreadsheet used with Sheets MCP before also works

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the safety profile is partly covered. The description adds that two rule shapes exist but omits key mutation context: whether rules stack or replace existing ones, precedence/ordering, and any permission requirements.

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?

A single front-loaded sentence with zero filler; the two rule modes are surfaced up front. It is efficient, though the terse phrasing leaves gaps that a slightly longer description could have closed.

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 nested objects, no output schema, and no enums, the description conveys the two entry points but omits behavioral details (rule stacking, replacement, interaction with existing formatting) that an agent needs to call it correctly.

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 60%, and the description only loosely restates what the schema already documents (condition types, color scale). It adds 'with a style' but does not explain the undocumented nested fields (bold, text_color, background_color, min/mid/max colors) or how values maps to the condition type.

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 ('Add') and resource ('conditional formatting rule') and enumerates the two supported forms (condition+style or color scale). It does not distinguish this from the sibling format_range, so it falls 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?

The description implies when each parameter path applies by presenting the two mutually exclusive modes, which helps an agent choose between 'condition' and 'color_scale'. However, it gives no explicit when-to-use vs. static formatting (format_range/format_ranges) or any prerequisites.

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