Skip to main content
Glama
HorizunGroup

Horizun PBI MCP

Official
by HorizunGroup

pbi_add_table_from_file

Loads data from local files (CSV, Excel, JSON, HTML) into a Power BI model, auto-detecting headers and culture to build a query with transformed steps.

Instructions

Carga un archivo al modelo como lo haria una persona: abrir, transformar, cargar.

El mismo recorrido de Power Query —Obtener datos, promover encabezados, cambiar tipos, Cargar— pero escrito directo en el proyecto. Los pasos de la consulta se llaman como los pone Power BI ('Origen', 'Encabezados promovidos', 'Tipo cambiado'), asi que se puede abrir y editar en el editor sin que desentone.

Admite .csv, .txt, .tsv, .xlsx, .xlsm, .json, .html/.htm y '.xls'. Sin dependencias nuevas: el .xlsx se lee como lo que es, un zip con XML, y el HTML con html.parser de la biblioteca estandar.

Un '.xls' NO se toma por la extension: se mira la firma real del archivo. En la practica, casi ningun '.xls' que exportan los ERPs es el binario OLE2 que la extension promete -- es una tabla HTML con esa extension porque Excel la abre igual. Si de verdad es OLE2 (Excel 97-2003), se rechaza con un mensaje claro en vez de leerlo mal; si es un .xlsx renombrado, se lee como .xlsx.

Para HTML: si el archivo trae varias <table>, se elige la mas grande y se avisa (usa table_id para elegir una en concreto, el id HTML de la tabla). Los encabezados solo se promueven si la tabla usa <th>; un reporte sin esa marca (el caso normal en un reporte de ERP, donde la fila 1 es el titulo del reporte, no un encabezado) carga con columnas 'Column1', 'Column2'...

La cultura se deduce del archivo, mirando como escribe los decimales, y se emite SIEMPRE explicita en la consulta. Asumir la del modelo es lo que convierte 10527.52 en diez millones sin que nada falle: un informe que abre, pinta y miente. culture permite forzarla.

Lo escrito se valida antes de darlo por bueno: si el TMDL generado no pasara pbi_validate_tmdl, se aborta en vez de dejar un proyecto que no abre.

Filas de basura antes del encabezado: es el patron de export mas comun de un ERP -fila 1 con el titulo del reporte y el resto de la fila vacia, encabezado real en la fila 2-. Por defecto se AUTODETECTA la primera fila que pueda ser encabezado (sin huecos y sin nombres repetidos) y se dice cual se eligio en warnings. skip_rows fuerza cuantas saltar cuando la deteccion no acierta; skip_rows=0 obliga a usar la fila 1 tal cual. Aplica a csv y xlsx.

dry_run=true devuelve el TMDL y la M sin escribir nada. sheet: hoja del libro; si se omite, la primera. Solo aplica a xlsx.

Escribe en TMDL: requiere el proyecto CERRADO en Power BI Desktop.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
sheetNo
cultureNo
dry_runNo
table_idNo
overwriteNo
skip_rowsNo
request_idNo
table_nameNo
descriptionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description discloses rich behavioral details beyond annotations: Power Query step naming, real-file-signature detection for .xls, HTML table selection, culture inference, header-row autodetection, TMDL validation before commit, and the closed-project requirement. This goes far beyond the sparse 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 long but appropriately structured, starting with the main purpose and then covering edge cases using clear labels and bold emphasis. Each paragraph adds meaningful operational detail, though it could be tightened by moving less common edge cases into optional notes.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is highly complete for a tool with complex file-handling behavior, covering formats, errors, validation, and dry-run output. It does not explain the overwrite parameter or table naming/description semantics, and it relies on the output schema for return-value details, which is acceptable but leaves minor gaps.

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 description coverage is 0%, so the description carries the burden for parameter meaning. It effectively explains path, sheet, culture, dry_run, table_id, skip_rows, and format-related parameters. However, overwrite, table_name, description, and request_id are not described, leaving gaps.

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 loads a file into the model with a specific verb and resource: 'Carga un archivo al modelo'. It distinguishes itself from sibling pbi_add_table_from_source by emphasizing file input support (.csv, .xlsx, .json, etc.) and the Power Query-like pipeline.

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 gives clear usage context: supported file types, required closed project, dry-run mode, and special handling for .xls/HTML files. It does not explicitly name alternatives like pbi_add_table_from_source, but the scope is well-defined enough to avoid confusion.

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/HorizunGroup/horizun-pbi-mcp'

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