Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
pbi_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.

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}

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.

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.

pbi_diagnoseA

One-shot diagnostic report for a Power BI dataset refresh failure.

Pipeline:

  1. Pull dataset metadata + datasources + gateways + schedule + impacted reports.

  2. Pick a refresh to analyze: explicit refresh_id, OR latest Failed ViaEnhancedApi refresh.

  3. Fetch refresh execution details (messages, objects, attempts).

  4. Classify error: root cause table/partition, error code, underlying pattern, next actions.

  5. 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.

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}.

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.

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.

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.

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}]

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}]

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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