power-bi-mcp
Power BI MCP Server
An MCP (Model Context Protocol) server that lets AI agents manage Power BI workspaces, datasets, and refreshes via natural language.
Features
Authentication & Discovery
Tool | Description |
| Authenticate via Azure AD device code flow (with token caching & auto-refresh) |
| List accessible workspaces (with optional name filter) |
| List datasets in a workspace |
Dataset & Refresh Management
Tool | Description |
| Aggregate dataset metadata + datasources + gateways + refresh schedule + impacted reports + PBIP locate (single call) |
| Trigger an Enhanced refresh (supports table-level, polling, retry, timeout) |
| Refresh lifecycle: view history ( |
Diagnostics & Source Code
Tool | Description |
| One-shot diagnostic report for refresh failures — root cause classification, error catalog, next actions, PBIP source hints |
| Locate PBIP source code for a dataset (fuzzy folder match + optional table TMDL & M source extraction) |
Query & Reporting
Tool | Description |
| Execute DAX queries against a dataset (supports RLS impersonation) |
| Generate a daily scheduled-refresh status report across all datasets in a workspace (JSON or Markdown table) |
Related MCP server: powerbi-mcp-local
Architecture
server.py # Entry point — configures logging, runs MCP via stdio
app.py # FastMCP instance with server instructions
config.py # Configuration loader (config.json, defaults, constants)
auth.py # Azure AD device code flow, token caching, HTTP helpers
diagnostics.py # Refresh error classification, PBIP folder/table locator
error_catalog.py # Error code catalog + regex patterns for failure classification
tools/ # MCP tool modules (auto-registered via __init__.py)
├── auth_tool.py # pbi_auth
├── workspace.py # pbi_list_workspaces, pbi_list_datasets
├── dataset.py # pbi_dataset_info
├── refresh.py # pbi_refresh_dataset, pbi_refresh_manage
├── diagnose.py # pbi_diagnose, pbi_locate_pbip
├── query.py # pbi_execute_query
└── report.py # pbi_scheduled_refresh_report
setup.ps1 # Azure AD App Registration automation (PowerShell)
config.json # User-specific config (gitignored)Quick Start
1. Install dependencies
git clone https://github.com/FreelexHo/power-bi-mcp.git && cd power-bi-mcp
uv venv && uv syncpython -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate
pip install -e .2. Register in your MCP client
Add to your MCP client configuration:
Cursor / Windsurf / Antigravity IDE (mcp.json):
{
"mcpServers": {
"power-bi": {
"command": "uv",
"args": ["run", "--directory", "/path/to/power-bi-mcp", "server.py"],
"transport": "stdio"
}
}
}3. Authenticate (one-time)
Just use the MCP! On first use, the agent will call pbi_auth and show you a message like:
To sign in, visit https://microsoft.com/devicelogin
and enter the code XXXXXXXXOpen the link in your browser
Enter the code shown
Sign in with your Microsoft work account
Approve the permissions
That's it. Tokens are cached to ~/.powerbi-mcp/token.json and auto-refreshed — you won't need to do this again unless you revoke access.
Configuration
The server works out of the box with a built-in public client_id. Create a config.json in the project root to customize:
{
"client_id": "<your-azure-ad-client-id>",
"token_cache_dir": "~/.powerbi-mcp",
"pbip_root": "C:/path/to/your/pbip-repo/data/power-bi-report"
}Key | Default | Description |
| Built-in public app | Azure AD App Registration client ID |
|
| Directory for cached OAuth tokens |
| (none) | Local PBIP repo root — enables |
A setup.ps1 script is included to automate App Registration creation via Azure CLI. See Advanced Setup below.
Troubleshooting
AADSTS7000218: The request body must contain ... client_assertion
Your organization may block public client flows. Ask your Azure AD admin to either:
Allow public client flows on the app registration, or
Create a dedicated App Registration for your team (use
setup.ps1)
AADSTS65001: The user or administrator has not consented
First-time users in a new Azure AD tenant need to consent to Power BI permissions. If your tenant requires admin consent:
Ask your admin to grant consent via Azure Portal -> App registrations -> API permissions -> "Grant admin consent"
Or use
setup.ps1to create your own App Registration where you are the owner
AADSTS50076: MFA required or AADSTS50079
Multi-factor authentication is required by your organization. The device code flow supports MFA — complete the MFA challenge in your browser when prompted.
Not authenticated. Call pbi_auth first.
Token has expired and could not be refreshed. The agent should automatically re-trigger pbi_auth. If it doesn't, ask the agent to call pbi_auth again.
Token keeps expiring
By default, tokens are cached at ~/.powerbi-mcp/token.json. Make sure:
The directory is writable
You are not running multiple instances that overwrite each other's tokens
Refresh details return 403
A 403 on pbi_refresh_manage action=details typically indicates insufficient permissions or the refresh record has expired.
Advanced Setup
For organizations that require their own App Registration:
Prerequisites
Azure AD permissions to create App Registrations
Run setup
./setup.ps1This creates an Azure AD App Registration with the correct configuration:
Setting | Value |
Sign-in audience | Multi-tenant (any Azure AD directory) |
Public client flows | Enabled |
Redirect URI |
|
API Permissions |
|
Tech Stack
Python ≥ 3.10
FastMCP (
mcp[cli]≥ 1.6.0) — MCP server framework, stdio transporthttpx ≥ 0.27.0 — HTTP client for Azure AD & Power BI REST API calls
License
MIT
Available Tools
11 toolspbi_authA
Authenticate to Power BI service.
Checks for cached token first, attempts refresh if expired, falls back to device code flow if needed.
Returns: JSON with authentication status and instructions if user action needed.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description effectively discloses the authentication behavior: cached token check, refresh attempt, and fallback to device code flow. It also notes potential user action needed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences with no waste: purpose, flow, and return value. Each sentence adds essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no parameters and an output schema, the description covers the return format and essential behavior, though additional details on error states or re-authentication could improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist; the description adds meaning beyond the empty schema by explaining the tool's behavior and return value, which is valuable for an agent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it authenticates to Power BI service and outlines the specific authentication flow, distinguishing it from sibling tools which are data-oriented.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies it should be used before other Power BI operations, but lacks explicit when-to-use or when-not-to-use guidance. However, since it is the only auth tool among siblings, context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pbi_dataset_infoA
Aggregate dataset metadata + datasources + bound gateways + refresh schedule + impacted reports.
Single call that returns everything needed to understand dataset configuration without making multiple round-trips. Useful for diagnostics and context-gathering.
Args: workspace_id: The workspace (group) ID. dataset_id: The dataset ID.
Returns: JSON object: {dataset, datasources, gateways, schedule, impacted_reports, pbip_locate}
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | Yes | ||
| dataset_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It describes the return structure but does not disclose behavioral traits like idempotency, authorization needs, or side effects (though likely read-only). For an info tool, this is adequate but not richly transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with a clear purpose statement, then Args and Returns sections. It is well-structured and front-loads the key value proposition. Every sentence serves a purpose, though the Args section could be more integrated.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (aggregating multiple sub-objects), the description adequately lists all returned components (dataset, datasources, gateways, schedule, impacted_reports, pbip_locate). With an output schema present, it doesn't need to detail return values. It is complete for diagnostics but lacks mention of prerequisites or error conditions.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. The Args section provides one-line definitions ('The workspace (group) ID', 'The dataset ID'), which adds basic meaning but no validation, format, or constraint details beyond the parameter names. This is minimal compensation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Aggregate dataset metadata + datasources + bound gateways + refresh schedule + impacted reports.' This specific verb 'Aggregate' and enumeration of resources precisely define what the tool does, distinguishing it from siblings like pbi_list_datasets (which lists datasets) and pbi_refresh_dataset (which refreshes).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description says 'Useful for diagnostics and context-gathering' and explains it avoids multiple round-trips, providing clear context for when to use. However, it does not explicitly mention when not to use or compare with alternative tools like pbi_list_datasets for listing vs. detailed info.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pbi_diagnoseA
One-shot diagnostic report for a Power BI dataset refresh failure.
Pipeline:
Pull dataset metadata + datasources + gateways + schedule + impacted reports.
Pick a refresh to analyze: explicit refresh_id, OR latest Failed ViaEnhancedApi refresh.
Fetch refresh execution details (messages, objects, attempts).
Classify error: root cause table/partition, error code, underlying pattern, next actions.
Add PBIP source code locate hint (folder path, expressions.tmdl, table file).
Args: workspace_id: The workspace (group) ID. dataset_id: The dataset ID. refresh_id: Optional specific refresh requestId. If omitted, auto-picks latest failed Enhanced refresh.
Returns: Structured JSON diagnostic report.
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | Yes | ||
| dataset_id | Yes | ||
| refresh_id | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries full burden. It transparently explains the 5-step pipeline, including automatic selection of the latest failed refresh if no refresh_id is provided. It also mentions classification and PBIP source code hints. However, it does not explicitly state read-only nature, authentication needs, or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured: a one-sentence purpose, a numbered pipeline list, and an Args section. Each part adds value without redundancy. It is concise given the complexity of the diagnostic process.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (5 steps) and the presence of an output schema (implies return structure), the description is complete. It covers the diagnostic workflow, parameter behavior, and return type. Minor omission: no example or additional context on error classification.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description adds context: workspace_id and dataset_id are described as 'The workspace (group) ID' and 'The dataset ID'; refresh_id is explained as optional with auto-pick behavior. This is adequate but could include more detail like format or constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'One-shot diagnostic report for a Power BI dataset refresh failure.' It details a specific pipeline, distinguishing it from sibling tools like pbi_refresh_dataset (triggers refresh) and pbi_dataset_info (general info). The verb 'diagnose' and resource 'refresh failure' are specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when diagnosing a refresh failure but lacks explicit when-to-use or when-not-to-use guidance. It does not mention alternatives among siblings or prerequisites, though it notes the optional refresh_id parameter behavior.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pbi_execute_queryA
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.
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | Yes | ||
| dataset_id | Yes | ||
| query | Yes | ||
| impersonated_user | No | ||
| include_nulls | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
pbi_list_datasetsA
List datasets in a Power BI workspace.
Args: workspace_id: The workspace (group) ID.
Returns: JSON array: [{id, name, configuredBy, isRefreshable, isOnPremGatewayRequired}]
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Since no annotations are provided, the description bears full responsibility. It correctly indicates a read operation by using the verb 'list,' and describes the return format. However, it does not disclose potential errors, permissions required, or any side effects, which is acceptable for a simple list but could be more thorough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise at two sentences plus a usage note, front-loaded with the main purpose. It efficiently conveys the tool's function without unnecessary detail, though a slightly more structured format (e.g., bullet points) could improve scannability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one parameter, list operation), the description is mostly complete, specifying the parameter and return fields. It lacks guidance on where to obtain the workspace_id and error handling, but the presence of an output schema (per context) covers return format details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With only one parameter and 0% schema description coverage, the description adds minimal value: 'workspace_id: The workspace (group) ID.' This clarifies the parameter's purpose but does not elaborate beyond the name, such as format or source.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List datasets in a Power BI workspace,' specifying the action (list), resource (datasets), and context (workspace). This distinguishes it from sibling tools like pbi_dataset_info (single dataset details) and pbi_list_workspaces (list workspaces).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage requires a workspace_id and hints at the return, but it does not explicitly state when to use this tool over alternatives. No mention of prerequisites like obtaining workspace IDs from pbi_list_workspaces or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pbi_list_workspacesA
List Power BI workspaces accessible to the authenticated user.
Args: filter: Optional name filter (case-insensitive substring match).
Returns: JSON array of workspaces: [{id, name, type, state, isOnDedicatedCapacity, capacityId}]
| Name | Required | Description | Default |
|---|---|---|---|
| filter | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses return format and filter behavior, but lacks annotations, so it must cover more. Authentication requirements and side effects (none) are implied but not explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with clean 'Args' and 'Returns' sections, front-loaded purpose, and no superfluous text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given one simple parameter and output schema, the description covers the core functionality and return format well. Minor gap: no mention of dependency on pbi_auth (though implied).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The single parameter 'filter' is fully explained in the description as 'case-insensitive substring match,' adding meaning beyond the minimal schema (no description, default only).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List Power BI workspaces accessible to the authenticated user,' specifying a verb and resource, and distinguishes it from sibling tools like pbi_list_datasets.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied as the default for listing workspaces, but no explicit when-to-use or alternatives are mentioned. Exclusions or prerequisites (e.g., authentication) are absent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pbi_local_modelA
Read local PBIP semantic model structure (TMDL files, no Desktop connection needed).
Requires 'pbip_root' configured in config.json.
Actions:
overview: Model summary - all tables with column/measure counts, relationship count.
table: Single table detail - columns, measures, partition M expression. Requires name.
measure: Single measure DAX expression + metadata. Requires name (fuzzy match across all tables).
expressions: Shared M expressions (datasource definitions).
relationships: All model relationships with from/to table.column and cardinality.
Args: dataset_name: Dataset name as it appears in Power BI Service. action: overview | table | measure | expressions | relationships name: Table or measure name (required for action=table/measure).
Returns: Structured JSON with model information.
| Name | Required | Description | Default |
|---|---|---|---|
| dataset_name | Yes | ||
| action | No | overview | |
| name | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must fully disclose behavior. It explains it reads local files and returns JSON, implying read-only, but does not explicitly state it does not modify anything or discuss error handling, permissions, or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with bullet points for actions and args. It is concise enough but could be trimmed slightly; however, it remains readable and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has few parameters, an output schema exists, and the description covers purpose, usage, and return format. It is complete for a simple file-reading tool, though missing examples or error handling.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, so the description adds the meaning. It explains each action's required arguments (e.g., name required for table/measure) and lists possible action values. This compensates well for the schema gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool reads local PBIP semantic model structure from TMDL files without needing Desktop connection. It lists specific actions (overview, table, measure, etc.) and is distinct from sibling tools like pbi_execute_query which query remote datasets.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions requirements (pbip_root config) and that no Desktop connection is needed, implying use for offline analysis. However, it does not explicitly compare to alternatives or state when not to use this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pbi_locate_pbipA
Locate PBIP source code for a dataset (and optionally read a specific table's TMDL + M source).
Requires 'pbip_root' configured in config.json (path to local PBIP repo root, e.g. 'C:/repos/my-project/data/power-bi-report').
Args: dataset_name: Dataset name as it appears in Power BI Service (e.g. 'QC Compliance Report'). Folder match is fuzzy: case-insensitive + non-alphanumeric stripped. table_name: Optional table name. If provided and dataset found, reads that table's .tmdl and extracts its partition M source.
Returns: JSON with {status, matches[], optional table content + partition_source_m}.
| Name | Required | Description | Default |
|---|---|---|---|
| dataset_name | Yes | ||
| table_name | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It details the fuzzy matching algorithm for dataset names and the optional table reading behavior. It specifies the return JSON structure. It could further clarify that the tool is read-only, but the given detail is substantial.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, with clear sections (Args, Returns) and no extraneous information. The purpose is front-loaded, and every sentence adds value. It is structured for quick comprehension.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema, the description still summarizes the return values, enhancing completeness. All necessary context is provided: prerequisites, parameter details, behavior, and output structure. The tool's complexity is low, and the description covers it fully.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides no parameter descriptions (0% coverage), so the description fully compensates. It explains dataset_name's fuzzy matching rule and table_name's optional nature and effect, adding significant meaning beyond the raw schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's verb 'Locate PBIP source code' and specifies the optional ability to read a specific table's TMDL and M source. It distinguishes from sibling tools like pbi_list_datasets, which list remote datasets, by focusing on local PBIP source code.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description lists the prerequisite 'pbip_root' configuration and describes parameter usage, but does not explicitly state when to use this tool versus alternatives or when not to use it. This leaves room for ambiguity about selection criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pbi_refresh_datasetA
Trigger an Enhanced refresh for a Power BI dataset.
Uses the Enhanced Refresh API (refreshType=ViaEnhancedApi), which enables GET refresh execution details with structured messages[] and objects[] (partition-level failures, error codes, SourceObject pointing to Table/Column/etc).
Args: workspace_id: The workspace (group) ID. dataset_id: The dataset ID. refresh_type: Full / ClearValues / Calculate / DataOnly / Automatic / Defragment (default Full). commit_mode: Transactional / PartialBatch (default Transactional). retry_count: Number of automatic retries (default 0). timeout: HH:MM:SS string, max 24:00:00 (default 01:00:00). tables: Optional list of table names to refresh, e.g. ["fact_sales", "dim_date"]. When omitted the entire dataset is refreshed. poll: If True, poll refresh details until terminal (default False). poll_interval: Seconds between polls (default 30). poll_timeout: Max seconds to wait when polling (default 1800).
Returns: JSON with {status, requestId, location, ...}. If poll=True also includes terminal details.
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | Yes | ||
| dataset_id | Yes | ||
| refresh_type | No | Full | |
| commit_mode | No | Transactional | |
| retry_count | No | ||
| timeout | No | 01:00:00 | |
| tables | No | ||
| poll | No | ||
| poll_interval | No | ||
| poll_timeout | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description thoroughly discloses refresh types, commit modes, retries, timeout, table filtering, and polling behavior. However, it does not mention prerequisites (e.g., workspace/dataset existence) or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with Args and Returns sections, front-loaded purpose. Some detail (e.g., API type explanation) is useful but could be slightly more concise without losing clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers all parameters, return format, and polling behavior comprehensively. Given the tool's complexity and absence of output schema in input, the description provides complete guidance for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Despite 0% schema description coverage, the description provides detailed explanations for all 10 parameters, including enums for refresh_type and commit_mode, format for timeout, and usage notes for tables. This fully compensates for missing schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it triggers an Enhanced refresh for a Power BI dataset using the Enhanced Refresh API. Distinguishes itself from siblings like pbi_refresh_manage by specifying the API type and structured return details.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains the enhanced refresh capability and when polling is beneficial, but does not explicitly compare to alternatives or state when not to use this tool versus other refresh methods.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pbi_refresh_manageA
Manage refresh lifecycle: view history, get execution details, or cancel.
Actions:
status: List recent refreshes (lightweight). Returns [{requestId, refreshType, startTime, endTime, status}].
details: Get execution details for a specific refresh (attempts, timing, status). Requires refresh_id. Works for all refresh types (Enhanced, OnDemand, Scheduled). Enhanced refreshes return richer data (messages, objects with partition-level detail); standard refreshes return basic timing/status.
cancel: Cancel an in-progress Enhanced refresh. Requires refresh_id.
Args: workspace_id: The workspace (group) ID. dataset_id: The dataset ID. action: Operation to perform - "status", "details", or "cancel". refresh_id: Required for "details" and "cancel" actions. top: Number of recent refreshes for "status" action (default 5). format: Output format - "json" (default) or "table" (Markdown table with local times).
Returns: JSON or Markdown table with action-specific results.
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | Yes | ||
| dataset_id | Yes | ||
| action | No | status | |
| refresh_id | No | ||
| top | No | ||
| format | No | json |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries the full burden. It discloses that cancel is destructive (cancels in-progress Enhanced refresh), and describes behavior differences between Enhanced and standard refreshes. Minor lack of detail on side effects of status/details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with sections (Actions, Args, Returns), bullet points, and clear formatting. Every sentence adds value; no fluff. Efficiently conveys all necessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (multiple actions, conditional params, output variations), the description is complete. It explains return types for each action and conditional parameter requirements. Output schema is present but description adds value beyond it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema has 0% description coverage, but the description fully explains each parameter: workspace_id, dataset_id, action (with values), refresh_id (conditional), top (default 5), format (json/table). Adds meaning beyond schema types/names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it manages refresh lifecycle with three distinct actions (status, details, cancel). It differentiates from siblings like pbi_refresh_dataset (trigger refresh) and pbi_scheduled_refresh_report (scheduling).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description lists prerequisites (refresh_id for details/cancel) but does not explicitly state when to use this tool vs alternatives (e.g., triggering vs managing refreshes). Some guidance is implicit through action descriptions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pbi_scheduled_refresh_reportA
List scheduled refresh status for every dataset that had scheduled refreshes recently.
Scans all refreshable datasets in a workspace, identifies those with any Scheduled refresh in the past 7 days, and reports refresh records for the target date (local display timezone). If a qualified dataset has no refresh on the target date, its most recent Scheduled refresh is shown instead (e.g. when Power BI auto-disabled the schedule after repeated failures).
Each record includes a current_status snapshot of the dataset's most
recent refresh (any type), so the reader can tell whether a past Scheduled
failure has since been resolved by an on-demand or API-triggered refresh.
Note: Scheduled refreshes do NOT support the Enhanced Refresh Details API, so error info comes from serviceExceptionJson only.
Args: workspace_id: The workspace (group) ID. date: Optional date string (YYYY-MM-DD) in display timezone. Defaults to today. format: Output format - "json" (default) or "table" (Markdown table).
Returns: JSON report or Markdown table with flat refresh records and workspace-level summary.
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | Yes | ||
| date | No | ||
| format | No | json |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It details scanning all refreshable datasets, checking the past 7 days, fallback behavior (shows most recent scheduled refresh if no refresh on target date), and the current_status snapshot. It also notes the error info source limitation. This is comprehensive and transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with paragraphs covering overview, fallback behavior, a note on API, and parameter details. It is front-loaded with the main purpose and each sentence adds value. No unnecessary repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (scanning multiple datasets, handling fallbacks, providing status snapshots) and the presence of an output schema, the description covers all necessary aspects: what the tool does, its effect (read-only), the return content (records and summary), and a notable limitation. It is complete for an agent to understand and invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, so the description must compensate. It does so by explaining the format parameter ('json' or 'table'), the date parameter (optional, 'YYYY-MM-DD' in display timezone, defaults to today), and the workspace_id is implicitly understood. It could provide more explicit guidance on workspace_id format, but overall adds meaningful context beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'List scheduled refresh status for every dataset that had scheduled refreshes recently.' It specifies the verb (list), resource (scheduled refresh status), and scope (datasets in a workspace). This distinguishes it from siblings like pbi_refresh_dataset (triggers a refresh) and pbi_refresh_manage (manages schedules).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use cases (viewing scheduled refresh status, checking failures resolved by on-demand refreshes) and mentions a limitation (no Enhanced Refresh Details API for scheduled refreshes). However, it does not explicitly state when not to use this tool or provide direct alternatives, leaving some guidance implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
11 tool updates
v0.1.0- First observed
pbi_auth - First observed
pbi_dataset_info - First observed
pbi_diagnose - First observed
pbi_execute_query - First observed
pbi_list_datasets - First observed
pbi_list_workspaces - First observed
pbi_local_model - First observed
pbi_locate_pbip - First observed
pbi_refresh_dataset - First observed
pbi_refresh_manage - First observed
pbi_scheduled_refresh_report
TDQS
Every tool focuses on a distinct Power BI operation—auth, dataset info, diagnostics, querying, listing, refreshing, managing refreshes, and local model exploration—with no functional overlaps. Descriptions clearly differentiate each tool's role.
All tools share a consistent 'pbi_' prefix. Most follow a verb_noun pattern (e.g., pbi_list_datasets, pbi_execute_query), but a few deviate (e.g., pbi_auth is a bare verb, pbi_local_model is adjective_noun, pbi_scheduled_refresh_report is lengthy). Overall pattern is recognizable.
11 tools is well-scoped for a Power BI dataset-focused server. It covers authentication, workspace/dataset listing, dataset info, DAX queries, refresh triggering, refresh management, diagnostics, and local source file interaction without bloat.
The tool surface provides strong coverage for dataset lifecycle: query, refresh, diagnose failures, and inspect local models. Minor gaps exist, such as no direct tool for creating or deleting datasets, but these are often handled outside the server's intended scope.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
Official Microsoft MCP Server to query Microsoft Entra data using natural language
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Python-based MCP server that enables interaction with Microsoft Fabric APIs for managing workspaces, lakehouses, warehouses, and tables through natural language.16-
- AlicenseCqualityBmaintenanceLocal-first MCP server for Power BI Desktop automation. Automate semantic model changes, DAX, Power Query, Excel, and report layout from MCP-capable AI clients.1001MIT
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol server for Microsoft Fabric that enables AI agents to query and analyze Lakehouse and Eventhouse data, and manage Eventstreams, using natural language through the MCP interface.MIT
- AlicenseNot gradedqualityCmaintenanceA Python-based MCP server that exposes Power BI semantic models to Claude, enabling natural-language querying of Power BI data through tools like listing workspaces, exploring datasets, executing DAX queries, and triggering refreshes.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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