manage_conditional_formats
Manages conditional-format rules that style cells when a condition holds (boolean rules; gradient color scales need raw_request). Rules are addressed by SHEET + INDEX in that sheet's rule list — get current rules and indexes from get_spreadsheet (sheets[].conditionalFormats), and re-read after ev...
This record as markdown: /tools/a1-x-tech-mcp-google-sheets/manage-conditional-formats.md
What manage_conditional_formats does on Mcp Google Sheets
AI agents use manage_conditional_formats to create or update resources in Mcp Google Sheets, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Mcp Google Sheets environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
bold | boolean | — | Bold text for matching cells. |
index | integer | — | Rule position in the sheet's list. add: insert position (default 0); update/delete: required. |
action | string | Yes | What to do with the rules. |
italic | boolean | — | Italic text for matching cells. |
ranges | array | — | add/update: the cells the rule applies to. |
sheet_id | integer | — | update/delete: the sheet whose rule list is addressed. |
text_color | string | — | Text color for matching cells, "#RRGGBB". |
condition_type | string | — | Sheets API condition type, e.g. ONE_OF_LIST, ONE_OF_RANGE, NUMBER_GREATER, NUMBER_LESS, NUMBER_BETWEEN, NUMBER_EQ, TEXT_CONTAINS, TEXT_STARTS_WITH, TEXT_EQ, TEX |
spreadsheet_id | string | Yes | The spreadsheet id — the long id from the URL (docs.google.com/spreadsheets/d/<spreadsheetId>/edit) or from create_spreadsheet / search_spreadsheets output. |
background_color | string | — | Fill for matching cells, "#RRGGBB". |
condition_values | array | — | Condition arguments: list items for ONE_OF_LIST (["Yes","No"]), one number for NUMBER_GREATER (["100"]), two for NUMBER_BETWEEN, "=A1>B1"-style formula for CUST |
Parameters from the server's own tool schema.
Why manage_conditional_formats is rated Medium
Modifies spreadsheet formatting rules reversibly; no data deletion or code execution.
From the tool's definition Manages conditional-format rules that style cells when a condition holds; add inserts rule
Risk signalsHigh parameter count (16 properties) · Bulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs manage_conditional_formats safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Mcp Google Sheets, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For manage_conditional_formats, this is the rule to start with:
manage_conditional_formats stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Mcp Google Sheets, apply this rule, and every manage_conditional_formats call is checked against it from then on.
Questions about manage_conditional_formats
Manages conditional-format rules that style cells when a condition holds (boolean rules; gradient color scales need raw_request). Rules are addressed by SHEET + INDEX in that sheet's rule list — get current rules and indexes from get_spreadsheet (sheets[].conditionalFormats), and re-read after every mutation because add/delete shift later indexes. action=add inserts a rule at index (default 0 = highest priority; rules are evaluated in order and the first match wins): needs ranges, condition_type (+condition_values; CUSTOM_FORMULA with a "=..." formula is the most flexible) and at least one format field (background_color, text_color, bold, italic). action=update replaces the ENTIRE rule at sheet_id+index with the newly provided one. action=delete removes the rule at sheet_id+index. It is categorised as a Write tool in the Mcp Google Sheets MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
manage_conditional_formats accepts 11 parameters: bold, index, action, italic, ranges, sheet_id, text_color, condition_type, spreadsheet_id, background_color, condition_values. Required: action, spreadsheet_id. The full parameter table on this page comes from the server's own tool schema.
Register the Mcp Google Sheets MCP server in PolicyLayer and add a rule for manage_conditional_formats: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Mcp Google Sheets. Nothing to install.
manage_conditional_formats is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the manage_conditional_formats rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for manage_conditional_formats. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
manage_conditional_formats is provided by the Mcp Google Sheets MCP server (@a1-x-tech/mcp-google-sheets). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Mcp Google Sheets, and thousands of servers like it.
This server
Across the catalogue