Skip to main content
Glama

add_conditional_format

Destructive

Apply conditional formatting to a Google Sheets range. Supports conditions like number greater/less, text contains, blank, and applies a chosen background color.

Instructions

Add a conditional formatting rule to a range.

Args: spreadsheet_id: The ID of the spreadsheet sheet: Sheet/tab name range: A1 notation range (e.g., 'B2:B100') rule_type: Condition type — 'NUMBER_GREATER', 'NUMBER_LESS', 'NUMBER_EQ', 'TEXT_CONTAINS', 'TEXT_NOT_CONTAINS', 'BLANK', 'NOT_BLANK', 'NUMBER_BETWEEN', 'NUMBER_NOT_BETWEEN' values: Condition values (e.g., ['100'] for greater than 100, ['10','50'] for between) background_color: Hex color to apply when condition is met (e.g., '#FF0000')

Returns: Result of the conditional formatting operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spreadsheet_idYes
sheetYes
rangeYes
rule_typeNoNUMBER_GREATER
valuesNo
background_colorNo#FF0000

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

The annotations already indicate destructiveHint=true, so the agent knows the tool modifies the spreadsheet. The description adds no further behavioral details beyond what the annotations provide, such as potential side effects (e.g., overwriting existing rules). It adequately describes the action but adds no extra transparency.

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 structured as a docstring with a brief statement followed by an Args list. It is clear and not overly verbose, though the list of rule types could be slightly more concise. Overall, it is well-organized and front-loaded.

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 6 parameters (3 required) and the presence of an output schema, the description covers all input parameters well. However, it lacks details about behavior on duplicate rules or invalid ranges. With the output schema present, the lack of return value explanation is acceptable. It is fairly complete for the tool's complexity.

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?

With 0% schema description coverage, the description fully compensates by explaining each parameter in the docstring. It provides examples (e.g., 'B2:B100' for range, 'NUMBER_GREATER' for rule_type, or values like ['100'] for greater than), adding significant meaning beyond the input schema.

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 clearly states the tool 'Add a conditional formatting rule to a range', specifying the verb 'Add', the resource 'conditional formatting rule', and the scope 'to a range'. This distinguishes it from sibling tools like 'add_filter', 'format_cells', etc.

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 does not provide explicit guidance on when to use this tool versus alternatives or when not to use it. It lists rule types but does not discuss prerequisites or context for selection. Usage is implied by the tool name and purpose, but no explicit when/when-not information is given.

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

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/socar-edwin/mcp-google-sheets-extended'

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