Skip to main content
Glama

set_conditional_formatting

Apply discrete background color bands to measure columns in Power BI tables/matrices. Set rule-based conditions to color each value based on min/max ranges.

Instructions

Apply DISCRETE rule-based BACKGROUND colour bands to a measure column in a table/matrix: each value in [min, max) renders its band colour. rules = JSON array of {min, max, color} (e.g. positive band #C6EFCE, negative band #e68f96). Writes the standard Power BI rule-based conditional-formatting structure (RuleDefinition rules with a >=min AND <max condition per band), NOT a gradient. For a smooth colour scale instead, use set_color_scale.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYespage name or displayName
rulesYesJSON array of {min, max, color} bands
visualYestable/matrix visual name
measureYesmeasure that drives the colour
objectNameNoformatting object (default values for table/matrix)values
measureTableYestable that owns the measure
propertyNameNoformatting property (default backColor)backColor
reportSessionIdYes
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing the internal Power BI RuleDefinition structure ('>=min AND <max condition per band'), the [min, max) interval semantics, and the fact that it writes rule-based formatting rather than a gradient. It stops short of detailing overwrite behavior or permissions, but the implementation detail provided is substantial.

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?

The description is two sentences plus a parenthetical example, tightly packed with useful information. It front-loads the primary action, uses emphasis for key distinctions ('DISCRETE', 'NOT a gradient'), and avoids filler. Every sentence earns its place.

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?

The tool is moderately complex (8 params, 6 required) with no output schema and no annotations, yet the description covers the core behavior, target visual type, rule structure, interval handling, and an alternative tool. Parameter descriptions in the schema handle most fields. Minor gaps like overwrite behavior and prerequisites don't undermine usefulness.

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 coverage is high (88%), so the baseline is 3. The description adds value by elaborating on the 'rules' parameter with a concrete JSON array format and color examples (#C6EFCE, #e68f96), and clarifies the interval semantics. It also reinforces that 'measure' drives the color. This goes beyond the bare schema descriptions.

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 uses a specific verb ('Apply') and clearly identifies the resource ('BACKGROUND colour bands to a measure column in a table/matrix') and scope ('DISCRETE rule-based'). It explicitly distinguishes itself from set_color_scale by stating 'NOT a gradient', making it clear what this tool does and how it differs from a key sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance by naming an alternative: 'For a smooth colour scale instead, use set_color_scale.' It also frames when to use this tool (for discrete bands) versus the alternative (smooth gradient), satisfying the when/when-not/alternatives requirement.

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/cyphonica/powerbi-pbix-mcp'

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