Skip to main content
Glama

set_conditional_row_color

Color tablix detail rows based on field values using a Switch expression, mapping values to colors with a customizable fallback.

Instructions

Color every cell of a tablix's detail row based on the value of one of its fields. Builds a Switch(...) expression mapping field values to colors and writes it as BackgroundColor on every detail cell. value_expression is the field reference (e.g. 'Fields!Status.Value' — a leading '=' is accepted). color_map is an ordered dict of value->color (e.g. {"Red":"#FF0000","Yellow":"#FFFF00"}); first match wins. Unmatched values fall back to default_color (default 'Transparent'). When case_sensitive is False (default), wraps the field reference in UCase() and uppercases the keys for case-insensitive matching. Walks the row hierarchy to find the Details leaf — works after add_row_group nests the structure. Replaces any existing BackgroundColor.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
color_mapYesOrdered map of expected values to color strings. First match in declaration order wins.
tablix_nameYes
default_colorNoTransparent
case_sensitiveNo
value_expressionYesField reference to switch on, e.g. 'Fields!Status.Value'. Leading '=' optional.
Behavior5/5

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

With no annotations provided, the description fully discloses the behavioral traits: it builds a Switch(...) expression, writes BackgroundColor, handles case sensitivity, walks row hierarchy, and replaces existing BackgroundColor. This is comprehensive.

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?

Description is front-loaded with the main purpose, then adds necessary details. Every sentence contributes value, though it could be slightly more concise without losing clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters, nested objects, no output schema), the description is complete. It covers how the tool works, what it writes, hierarchy handling, and edge cases like case sensitivity and fallback.

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?

Schema coverage is only 33%, but the description adds detailed meaning to all parameters: value_expression format, color_map as ordered dict, default_color default, case_sensitive behavior. This compensates well for the schema gaps.

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?

Description clearly states the verb 'color', the resource 'every cell of a tablix's detail row', and the mechanism 'based on the value of one of its fields'. It distinguishes from sibling tools like set_alternating_row_color and style_tablix_row by specifying conditional per-field coloring.

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?

Description provides clear context on when to use this tool: for coloring detail rows based on a field value. It explains behavior like first-match-wins and fallback to default_color. However, it does not explicitly state when not to use it or mention direct alternatives.

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/mafaq229/pbirb-mcp'

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