Skip to main content
Glama

files_set_conditional_format

Adds (or replaces) a formula-based conditional formatting rule on a range: cells where the formula evaluates truthy get the given style. The formula is a spreadsheet formula referencing cells relative to the top-left of the range (like Excel conditional formatting), e.g. 'A1>100', 'ISBLANK(A1)', 'A1="done"'. At least one style property must be set. Pass 'id' (from files_conditional_formats) to replace that existing rule instead of creating a new one — omit it to create a new rule. Requires edit permission; does not change values. Signature: files_set_conditional_format(file_uuid, range, formula, sheet?, id?, bold?, italic?, underline?, strikethrough?, text_color?, fill_color?, apply_to_blank?).

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": {
      "file_uuid": "<file_uuid>",
      "range": "<range>",
      "formula": "<formula>"
    },
    "name": "files_set_conditional_format"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoExisting rule id (from files_conditional_formats) to replace; omit to create a new rule.
boldNo
rangeYesA1 range the rule applies to, e.g. 'A1:A100'.
sheetNoSheet name (defaults to the first sheet).
italicNo
formulaYesCondition formula; cells where it is truthy get the style. References are relative to the range's top-left. English and Russian notation are both accepted, as in files_set_formula.
file_uuidYes
underlineNo
fill_colorNoHex background color.
text_colorNoHex text color, e.g. '#B00020'.
strikethroughNo
apply_to_blankNoApply the rule to blank cells too (default: rule-type default).

Output Schema

NameRequiredDescriptionDefault
rangeYes
file_uuidYes
sequence_numberYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Adds real context beyond the annotations: it requires edit permission, does not change cell values, replaces the existing rule when 'id' is given, and requires at least one style property. Consistent with destructiveHint=false and idempotentHint=false (omitting 'id' keeps creating new rules).

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?

Front-loaded with the core behavior followed by the formula semantics and the id rule. The trailing 'Signature: ...' parameter list largely duplicates the schema and could be dropped, but the rest is dense and useful.

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 an existing output schema and annotations covering the safety profile, the description fills the remaining gaps: permission requirement, replace semantics, formula reference model, and style constraint. Little an agent needs to call it correctly is missing.

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?

With 58% schema coverage, the description compensates well: it explains the relative-reference semantics of 'formula' with concrete examples ('A1>100', 'ISBLANK(A1)'), restates the id create/replace distinction, and states the at-least-one-style-property constraint. Color/boolean styling params are left to the schema but are self-evident.

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?

States the specific verb+resource ('adds (or replaces) a formula-based conditional formatting rule on a range') and immediately distinguishes the create vs. replace behavior via the 'id' parameter. An agent can tell it apart from files_conditional_formats, files_delete_conditional_format, and files_set_color_scale.

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?

Explicitly says to pass 'id' (from files_conditional_formats) to replace an existing rule and omit it to create a new one, and notes the edit-permission prerequisite. It doesn't explicitly mention when to prefer this over the sibling color-scale tool, but the 'formula-based' framing makes the split reasonably clear.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources