An MCP server for analyzing Power BI files using PBIXRay
The PBIXRay server has 10 tools with minimal documentation. All tools lack parameter descriptions despite having input schemas. Most tools have only 1-2 parameter descriptions total. Tool descriptions are present but generic (10-80 chars, well below the 194-char baseline). No output schemas are documented. No error handling guidance. The server implements basic tool registration via FastMCP but lacks the depth required for LLM-driven tool selection and safe composition.
Get all DAX measures defined in the model with their expressions.
Get metadata about the Power BI configuration used during model creation.
Get a summary of the Power BI model including overview information.
Display all M/Power Query code used for data transformation.
Show all relationships defined in the model between tables.
Display the schema of all tables in the model including column names and data types.
Get detailed statistics about the Power BI model including table sizes, column counts, and data types.
No parameter descriptions. 8 of 10 tools have empty input schemas or single parameters with no description text. The 'table_name' param in get_table_contents has a description, but 8 other tools lack any parameter guidance. LLMs cannot infer what inputs these tools expect.
No output schemas documented. The source code shows example invocations (examples/demo.py) but no explicit return type documentation in tool definitions. LLMs cannot plan downstream tool calls or extract specific fields without knowing response structure.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 40 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 46 | - | v1 |
Get the first N rows of data from a specific table in the Power BI model.
List all tables in the model.
Load a Power BI (.pbix) file for analysis.
Generic, short descriptions. Tool descriptions are 40-80 chars (far below 194-char baseline). E.g., 'Get all tables in the model' and 'Display all M/Power Query code' lack context on WHEN to use each tool or what prerequisites exist (e.g., must call load_pbix_file first). Descriptions do not guide LLM selection between similar tools.
No error handling guidance. The server implements try-catch error handling in the async wrapper (run_model_operation) but no error responses indicate recovery steps, error categories (retryable vs. fatal), or next actions for LLMs. An LLM receiving 'Error: file not found' has no way to know whether to retry, ask the user, or call a different tool.
State-dependent tool execution. The server uses a global 'current_model' variable. Many tools (get_tables, get_metadata, etc.) will fail or return stale data if load_pbix_file has not been called. This dependency is not documented in tool descriptions, forcing LLMs to guess the required call sequence.
No input validation or constraints. The 'file_path' parameter in load_pbix_file accepts any string with no documented format, length, or allowed-path constraints. The 'table_name' parameter in get_table_contents is unconstrained. No validation error messages guide LLM self-correction.
No pagination or limit parameters. Tools like get_tables, get_relationships, and get_power_query may return unbounded results. The source code shows MAX_ROWS and PAGE_SIZE config options but these are not exposed as tool parameters, and no response limits are documented.
load_pbix_file uses a global state variable (current_model). Non-idempotent: calling it twice with the same file_path may have different side effects if the file was modified between calls, or if the previous parse is cached. State-dependent tools risk duplicate side effects on agent retry.