Skip to main content
Glama

dax_lint

Lint DAX expressions offline or in live models to catch anti-patterns like FILTER in CALCULATE and unknown AI-hallucinated functions, with line-severity rewrite hints.

Instructions

PURE OFFLINE DAX static linter - no live session needed for a raw expression (the gap run_bpa cannot cover: linting a CANDIDATE expression before it is applied). Pass expression for offline lint; or sessionId to lint live measures (all, one table's, or one measure via table+measure). Rules with line numbers, severity and a rewrite hint: FILTER(wholeTable) inside CALCULATE, nested CALCULATE, '/' where DIVIDE belongs, IFERROR wrapping, '+ 0' blank suppression, EARLIER usage, SUMMARIZE used for aggregation, and UNKNOWN_FUNCTION - the AI-hallucinated-function catcher, checked against a maintained static catalogue (model UDFs auto-admitted in session mode; admit new engine functions via extraFunctions, comma-separated).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNowith sessionId: restrict to one table
measureNowith sessionId: restrict to one measure
sessionIdNolive model sessionId - lints measures instead of a raw expression
expressionNoa raw DAX expression to lint offline (mutually exclusive with sessionId)
extraFunctionsNocomma-separated extra function names to accept as known
Behavior5/5

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

With no annotations, the description carries full burden, and it delivers: it discloses offline vs. session behavior, lists specific lint rules, mentions the UNKNOWN_FUNCTION catcher with a maintained static catalogue, and explains how extraFunctions can extend the catalogue. This goes far beyond a basic 'linter' label.

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 dense sentence that front-loads the key phrase 'PURE OFFLINE DAX static linter' and packs in modes, rules, and extensibility without fluff. It could be split into multiple sentences for readability, but every clause earns its place.

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?

Despite having no output schema, the description specifies that results include 'line numbers, severity and a rewrite hint.' It fully covers all parameters, both usage modes, the rule list, and the extension mechanism, making it complete for a tool of this complexity.

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?

The schema already has 100% coverage for all five parameters, so the baseline is 3. The description adds meaningful context by clarifying the mutual exclusivity of expression and sessionId, the use of table+measure for restricting to one measure, and the comma-separated format for extraFunctions. This elevates it above the baseline.

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 explicitly states the tool is a 'PURE OFFLINE DAX static linter' and immediately distinguishes it from the sibling tool run_bpa by calling out the gap it fills ('linting a CANDIDATE expression before it is applied'). This makes the purpose and scope unmistakable.

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?

Provides explicit when-to-use guidance: use offline mode for raw expressions without a live session, or use sessionId to lint live measures. It also names the alternative (run_bpa) and explains the gap the tool covers, making the choice clear.

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