Skip to main content
Glama
taylorwilsdon

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Manage Conditional Formatting

manage_conditional_formatting
Destructive

Add, update, or delete conditional formatting rules in Google Sheets to highlight cells when conditions like numbers, text, dates, or color scales match.

Instructions

Manages conditional formatting rules on a Google Sheet. Supports adding, updating, and deleting conditional formatting rules via a single tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesThe operation to perform. Must be one of "add", "update", or "delete".
range_nameNoA1-style range (optionally with sheet name). Required for "add". Optional for "update" (preserves existing ranges if omitted). Not used for "delete".
rule_indexNo0-based index of the rule. For "add", optionally specifies insertion position. Required for "update" and "delete".
sheet_nameNoSheet name to locate the rule when range_name is omitted. Defaults to the first sheet. Used by "update" and "delete".
text_colorNoHex text color to apply when condition matches. Used by "add" and "update".
condition_typeNoSheets condition type (e.g., NUMBER_GREATER, TEXT_CONTAINS, DATE_BEFORE, CUSTOM_FORMULA). Required for "add". Optional for "update" (preserves existing type if omitted).
spreadsheet_idYesThe ID of the spreadsheet. Required.
gradient_pointsNoList (or JSON list) of gradient points for a color scale. If provided, a gradient rule is created and boolean parameters are ignored. Used by "add" and "update".
background_colorNoHex background color to apply when condition matches. Used by "add" and "update".
condition_valuesNoValues for the condition; accepts a list or a JSON string representing a list. Depends on condition_type. Used by "add" and "update".
user_google_emailYesThe user's Google email address. Required.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv1.28.0
    • removedInput schema / properties / background_color / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / background_color / type
      Added value: +"string"
    • removedInput schema / properties / condition_type / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / condition_type / type
      Added value: +"string"
    • changedInput schema / properties / condition_values / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "items": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "number"
      -        }
      -      ]
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "number"
      +        }
      +      ]
      +    },
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / gradient_points / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "type": "array"
      +  }
      +]
    • removedInput schema / properties / range_name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / range_name / type
      Added value: +"string"
    • removedInput schema / properties / rule_index / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / rule_index / type
      Added value: +"integer"
    • removedInput schema / properties / sheet_name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / sheet_name / type
      Added value: +"string"
    • removedInput schema / properties / text_color / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / text_color / type
      Added value: +"string"
  2. Addedv1.0.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the mutation risk is known. The description adds value by clarifying that a single tool handles add/update/delete, and the schema notes that 'update' preserves existing ranges/types if omitted. However, it does not disclose side effects like whether deleting a rule is irreversible or whether adding a rule can affect existing rules.

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?

The description is a single, efficient sentence that front-loads the tool's purpose and lists the supported operations. It is appropriately sized for a tool with a rich schema, though it could add a brief usage hint without becoming verbose.

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?

Given the tool's complexity (11 params, 3 actions, gradient vs boolean rules), the description plus the fully documented schema covers the essential information. The output schema exists, so return values need not be described. A small gap is the lack of guidance on choosing between gradient and boolean rule parameters, but the schema's note that gradient ignores boolean parameters partially covers this.

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 description coverage is 100%, so the schema already documents all 11 parameters in detail. The description itself adds no parameter-level meaning beyond what the schema provides, which meets the baseline for high coverage.

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

Purpose5/5

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

The description states a specific verb ('Manages') and resource ('conditional formatting rules on a Google Sheet') and explicitly lists the three supported operations (adding, updating, deleting). This clearly distinguishes it from sibling tools like format_sheet_range or modify_sheet_values, which handle other aspects of sheet formatting.

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

Usage Guidelines4/5

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

The description implies usage context by naming the three operations, and the schema provides per-action parameter requirements (e.g., range_name required for 'add', rule_index required for 'update'/'delete'). However, it does not explicitly state when to prefer this tool over alternatives like format_sheet_range, nor does it mention exclusions or prerequisites.

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

Deploy Server

Other Tools