Skip to main content
Glama
Google Workspace MCP Server

Google Workspace MCP Server

by akilja24

update_conditional_formatting

Updates an existing conditional formatting rule by index in a Google Sheet, letting you change its range, condition, matching colors, or gradient points while preserving omitted settings.

Instructions

Updates an existing conditional formatting rule by index on a sheet.

Args: user_google_email (str): The user's Google email address. Required. spreadsheet_id (str): The ID of the spreadsheet. Required. range_name (Optional[str]): A1-style range to apply the updated rule (optionally with sheet name). If omitted, existing ranges are preserved. rule_index (int): Index of the rule to update (0-based). condition_type (Optional[str]): Sheets condition type. If omitted, the existing rule's type is preserved. condition_values (Optional[Union[str, List[Union[str, int, float]]]]): Values for the condition. background_color (Optional[str]): Hex background color when condition matches. text_color (Optional[str]): Hex text color when condition matches. sheet_name (Optional[str]): Sheet name to locate the rule when range_name is omitted. Defaults to first sheet. gradient_points (Optional[Union[str, List[dict]]]): If provided, updates the rule to a gradient color scale using these points.

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

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "user_google_email": "<user_google_email>",
      "spreadsheet_id": "<spreadsheet_id>",
      "rule_index": "<rule_index>"
    },
    "name": "update_conditional_formatting"
  }
}

Input Schema

NameRequiredDescriptionDefault
range_nameNo
rule_indexYes
sheet_nameNo
text_colorNo
condition_typeNo
spreadsheet_idYes
gradient_pointsNo
background_colorNo
condition_valuesNo
user_google_emailYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.13.1

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose genuinely useful behavior: optional fields are preserved when omitted ('If omitted, existing ranges are preserved', 'the existing rule's type is preserved') and gradient_points converts the rule to a color scale. It omits the mutation risk profile — whether existing formatting is overwritten, permission/auth requirements, and error behavior for a bad index — so a 3 is the fair ceiling.

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?

Front-loaded one-sentence summary followed by a scannable per-parameter Args block, with a short Returns note. The type restatements are redundant with the schema but keep the list readable and don't pad the prose; nothing extraneous.

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?

For a 10-parameter mutation tool with zero annotation coverage, the definition covers every parameter and states the partial-update contract plus the return value (output schema also exists). Missing auth/permission requirements and failure modes on an invalid rule_index keep it from being fully complete.

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?

Schema description coverage is 0%, so the description must compensate, and it largely does: all 10 parameters are documented with meaning beyond bare types — 0-based rule_index, A1-style range_name, hex color formats, sheet_name defaulting to the first sheet, and the preserve-on-omit semantics. Weak spots remain: condition_values is described only as 'Values for the condition' with no format or allowed condition_type values, and gradient_points' accepted dict shape is unspecified.

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 first sentence gives a specific verb and resource ('Updates an existing conditional formatting rule') and adds a locating scope ('by index on a sheet'), which implicitly separates it from add/delete-style siblings. It stops short of explicitly naming an alternative, so it is clear but not maximally differentiating.

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?

Usage is implied by 'updates an existing ... rule by index': the agent knows a rule must already exist and is identified positionally. However, there is no explicit when-to-use versus add_conditional_formatting/delete_conditional_formatting, no prerequisites (edit access), and no guidance on what happens if rule_index is out of range.

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