Skip to main content
Glama

pbi_execute_query

Run DAX queries against Power BI datasets to retrieve data rows. Supports row-level security impersonation and optional null inclusion.

Instructions

Execute a DAX query against a Power BI dataset and return the result rows.

Uses the Execute Queries REST API (POST executeQueries). Only DAX queries are supported; MDX and DMV are not.

Limitations (enforced by the Power BI service):

  • One query per call, one table per query.

  • Max 100,000 rows or 1,000,000 cell values (whichever is hit first).

  • Max 15 MB per response payload.

  • 120 requests/minute/user rate limit.

Args: workspace_id: The workspace (group) ID. dataset_id: The dataset ID. query: A DAX query string, e.g. EVALUATE SUMMARIZECOLUMNS(...). impersonated_user: Optional UPN for RLS impersonation (ignored if model has no RLS). include_nulls: Whether null values are serialised in the response (default True).

Returns: JSON with {rows, row_count} on success, or {error, ...} on failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_idYes
dataset_idYes
queryYes
impersonated_userNo
include_nullsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Without annotations, the description fully discloses behavioral traits: it uses the POST executeQueries API, lists enforced limitations (max rows, cell values, payload size, rate limit), and describes the return format. No contradictions with missing annotations.

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 well-structured with sections and bullet points, front-loading the primary purpose. It is longer than necessary but every sentence provides value. Minor redundancy (e.g., mentioning API in two places) could be trimmed.

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 has 5 parameters, zero annotations, and an output schema, the description covers all necessary context: operation type, limitations, return format, and parameter semantics. It is sufficient for an agent to decide when and how to invoke the tool correctly.

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?

With 0% schema description coverage, the description adds substantial meaning: it defines workspace_id, dataset_id, query with an example, explains impersonated_user and include_nulls defaults, and mentions that null serialization is controllable. This compensates completely for the lack of schema 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 the tool executes a DAX query against a Power BI dataset and returns result rows. It distinguishes from siblings by specifying DAX-only support, while siblings like pbi_list_datasets and pbi_refresh_dataset serve different purposes.

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?

It provides specific usage constraints: only DAX queries, one query per call, one table per query, and rate limits. It also explains when impersonated_user is applicable. However, it could explicitly state when not to use this tool (e.g., for MDX or DMV queries) and mention 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/FreelexHo/power-bi-mcp'

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