Skip to main content
Glama

pbi_dax_query

Run DAX queries in Power BI Desktop and retrieve the result grid. Overwrites editor content; use for temporary queries.

Instructions

Write DAX into the DAX query view editor and RUN it, then read the results grid. Reaches the daxQueryView CDP target (SEPARATE from reportView); {ok:false, reason} if the view has never been opened in Desktop (open the DAX query view tab first — this tool will NOT open ribbon views). Runs via F5 on the focused editor, falling back to a visible "Run" button. Returns {ran, columns, rows, rowCount, error?}. CAVEAT: this OVERWRITES whatever DAX the user had in the query editor — prior text is NOT restored (unrecoverable). Use a throwaway query view.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daxYesThe DAX to run (EVALUATE …). Overwrites the editor content.
timeoutMsNoHow long to poll for results (default 30000)
Behavior5/5

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

Despite no annotations, the description thoroughly discloses behavioral traits: overwrites prior content, runs via F5 with fallback, requires view to be opened, and specifies return format (ran, columns, rows, rowCount, error?). No contradictions.

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?

Well-structured with front-loaded purpose. However, the overwrite warning is mentioned twice, slightly reducing conciseness. Still efficient overall.

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 and absence of output schema, the description covers required prerequisites, behavior, return values, caveats, and usage guidance comprehensively.

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 100% so baseline is 3. The description adds meaning by explaining that the 'dax' parameter 'Overwrites the editor content' and that 'timeoutMs' is polling time, providing extra context beyond the schema.

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 action (Write DAX and run it) and the resource (DAX query view editor) with a specific verb 'Write' and 'RUN', and distinguishes from sibling tools like pbi_read_dax_editor by specifying the execution aspect.

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 context: when to use (to run DAX), prerequisites (view must have been opened in Desktop), and a clear caveat (overwrites editor content, unrecoverable) with advice to use a throwaway query view.

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/bibiibjorn/pbi-webview2'

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