Skip to main content
Glama
c0webster

Hardened Google Workspace MCP

by c0webster

add_conditional_formatting

Apply conditional formatting rules to Google Sheets ranges to highlight cells based on specific conditions like values, dates, or custom formulas.

Instructions

Adds a conditional formatting rule to a range.

Args: user_google_email (str): The user's Google email address. Required. spreadsheet_id (str): The ID of the spreadsheet. Required. range_name (str): A1-style range (optionally with sheet name). Required. condition_type (str): Sheets condition type (e.g., NUMBER_GREATER, TEXT_CONTAINS, DATE_BEFORE, CUSTOM_FORMULA). 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. background_color (Optional[str]): Hex background color to apply when condition matches. text_color (Optional[str]): Hex text color to apply when condition matches. rule_index (Optional[int]): Optional position to insert the rule (0-based) within the sheet's rules. 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.

Returns: str: Confirmation of the added rule.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_google_emailYes
spreadsheet_idYes
range_nameYes
condition_typeYes
condition_valuesNo
background_colorNo
text_colorNo
rule_indexNo
gradient_pointsNo
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/c0webster/hardened-google-workspace-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server