Skip to main content
Glama

assert_measure

Evaluate a scalar DAX expression and compare it to an expected value, returning pass or fail. Supports numeric tolerance and ordinal string comparison for validating Power BI measures.

Instructions

Evaluate a scalar DAX expression (EVALUATE ROW) and compare the result to an expected value: numeric-vs-numeric within tolerance, otherwise ordinal string compare of the invariant-culture rendering. A mismatch returns pass:false (not an error) - the single-assert form of run_golden_set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daxYesscalar DAX expression, e.g. [Total Sales] or CALCULATE([Sales], Dim[Year]=2025)
expectedYesexpected value, invariant-culture (e.g. 12345.67)
sessionIdYes
toleranceNoabsolute numeric tolerance (default 1e-6)
Behavior5/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 excels. It discloses that mismatches return pass:false (not an error) and explains the exact comparison logic (numeric tolerance vs ordinal string compare). This is valuable behavioral insight beyond the schema.

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?

Two sentences, front-loaded with the primary action, and packed with important details: evaluation method, comparison rules, return behavior, and relationship to run_golden_set. No redundancy or extraneous text.

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 description covers core behavior, comparison semantics, and error handling well. It lacks explicit return structure (e.g., what pass:true looks like) and does not explain sessionId, but the tool is simple and no output schema exists. Overall, it is highly functional for an agent.

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 covers 75% of parameters with descriptions. The description adds meaning by clarifying dax as a scalar expression evaluated via EVALUATE ROW and expected as invariant-culture rendering for ordinal comparison. However, the required sessionId parameter remains undocumented in both schema and description, which limits the score.

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 the tool evaluates a scalar DAX expression and compares it to an expected value, with detailed comparison semantics. It distinguishes itself from siblings by noting it is the single-assert form of run_golden_set.

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?

Provides clear context for when to use this tool: for single assertions and as an alternative to run_golden_set. It does not explicitly list when not to use it or compare with other sibling tools like run_dax, but the 'single-assert form' phrasing gives practical usage guidance.

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