Skip to main content
Glama
tom275275

Google Workspace MCP Server

by tom275275

manage_conditional_formatting

Add, update, or delete conditional formatting rules in Google Sheets to automatically highlight cells based on specified conditions, colors, or gradients.

Instructions

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

Args: user_google_email (str): The user's Google email address. Required. spreadsheet_id (str): The ID of the spreadsheet. Required. action (str): The operation to perform. Must be one of "add", "update", or "delete". range_name (Optional[str]): A1-style range (optionally with sheet name). Required for "add". Optional for "update" (preserves existing ranges if omitted). Not used for "delete". condition_type (Optional[str]): Sheets condition type (e.g., NUMBER_GREATER, TEXT_CONTAINS, DATE_BEFORE, CUSTOM_FORMULA). Required for "add". Optional for "update" (preserves existing type if omitted). condition_values (Optional[Union[str, List[Union[str, int, float]]]]): Values for the condition; accepts a list or a JSON string representing a list. Depends on condition_type. Used by "add" and "update". background_color (Optional[str]): Hex background color to apply when condition matches. Used by "add" and "update". text_color (Optional[str]): Hex text color to apply when condition matches. Used by "add" and "update". rule_index (Optional[int]): 0-based index of the rule. For "add", optionally specifies insertion position. Required for "update" and "delete". gradient_points (Optional[Union[str, List[dict]]]): List (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". sheet_name (Optional[str]): Sheet name to locate the rule when range_name is omitted. Defaults to the first sheet. Used by "update" and "delete".

Returns: str: Confirmation of the operation and the current rule state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes
range_nameNo
rule_indexNo
sheet_nameNo
text_colorNo
condition_typeNo
spreadsheet_idYes
gradient_pointsNo
background_colorNo
condition_valuesNo
user_google_emailYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.14.3

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It discloses action-specific behavior (e.g., range_name is optional for update and preserves existing ranges, rule_index required for update/delete, gradient_points creates a gradient rule and ignores boolean parameters) and states the return value. This is strong, though it could be even clearer about destructive effects and the odd 'boolean parameters' reference.

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?

The description is long but appropriate for a tool with 11 parameters and three actions. It is structured with a clear summary followed by an Args section, and each parameter line adds necessary operational detail without unnecessary prose.

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?

The description covers all parameters, action variants, return type, and key behavioral nuances, which is strong for a complex tool. It loses a point because it does not provide a complete mapping of condition_type values to expected condition_values, and the phrase about 'boolean parameters' is confusing given no boolean parameters exist in the schema.

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

Parameters5/5

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

The input schema has 0% description coverage, so the description must fully document parameters, and it does. It explains each parameter's purpose, constraints, and action applicability, including the action enum values, required conditions, and accepted formats like JSON strings for lists.

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'), a resource ('conditional formatting rules on a Google Sheet'), and enumerates the supported operations (add, update, delete). This clearly differentiates the tool from the sibling tools, including format_sheet_range, by focusing on rule management rather than one-time 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 provides clear context that this tool is for managing conditional formatting rules and explains the three action modes. It does not explicitly name alternatives or state when not to use it, but the scope is specific enough that an agent can determine appropriate use.

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