Skip to main content
Glama

set_button_state_cf

Set button state colors in Power BI using a measure that returns hex values, applying to fill, text, or icon for default, hover, pressed, or selected states.

Instructions

Measure-driven per-STATE button formatting: a measure returning a hex colour drives a button's fill/text/icon colour for a given state. state=default|hover|pressed|selected; target=fill|text|icon. button is the actionButton's visual name. colorMeasure = "Table[Measure]".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYespage name or displayName
stateNodefault | hover | pressed | selecteddefault
buttonYesthe button visual name
targetNofill | text | iconfill
colorMeasureYesthe colour measure, "Table[Measure]"
reportSessionIdYes
colorMeasureTableNothe measure's table (if not embedded in colorMeasure)
Behavior2/5

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

With no annotations, the description bears the full behavioral disclosure burden. It explains the input semantics well but does not disclose side effects such as whether existing button formatting is overwritten, whether changes are reversible, or any permissions required. As a mutation tool, this is a notable gap.

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 a single compact sentence that front-loads the core purpose and then lists parameter semantics. It is dense but efficient, with no wasted words. Slightly more structure (e.g., separate sentences for each key concept) could improve readability, but it remains strong.

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

Completeness3/5

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

The description covers the main purpose and key parameters, benefiting from high schema coverage. However, it omits usage guidance and behavioral side-effect disclosure, and with no output schema or annotations, it leaves the full operational context incomplete. It is adequate but not comprehensive for a 7-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is high (86%), so the baseline is 3. The description clarifies the format of colorMeasure and the meaning of state/target, but these are largely already present in the schema. It adds minimal extra meaning beyond the structured field 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 clearly states a specific action: 'Measure-driven per-STATE button formatting' where a measure's hex color drives fill/text/icon colors for a given state. It explicitly enumerates state and target values, distinguishing this from generic conditional formatting or other button-related tools.

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 implies when to use it (for per-state button color formatting driven by a measure) but does not explicitly compare with alternative tools like set_conditional_formatting or set_web_url_cf. No exclusions or precise alternatives are given, making the usage context clear but not fully delimited.

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