Skip to main content
Glama
HorizunGroup

Horizun PBI MCP

Official
by HorizunGroup

pbi_update_power_query

Replace an entire Power Query M expression in a .pbip model with dry-run preview, integrity checks, and automatic rollback if the TMDL becomes invalid.

Instructions

Reemplaza ENTERA la consulta M de una particion o expresion.

No hay edicion parcial ni sustitucion por expresion regular: se localiza el bloque por su estructura y se cambia completo. dry_run viene ACTIVADO: la primera llamada enseña lo que se escribiria sin tocar el disco, sin backup y sin journal.

expected_sha256 (el que devuelve pbi_get_power_query) rechaza la escritura si el texto cambio desde que lo leiste, en vez de pisar el trabajo de otro.

Escribe TMDL: exige proyecto .pbip y Power BI Desktop CERRADO. Va con backup, journal, transaccion, relectura y rollback; si el modelo queda con errores TMDL que antes no tenia, se revierte entero.

La respuesta distingue lo comprobado de lo no comprobado: parse_checked y tmdl_load_checked dicen que el TMDL se lee y que el serializador oficial lo acepta; m_engine_checked y refresh_checked son SIEMPRE false. Que el archivo parsee no significa que la consulta cargue: eso solo lo dice un refresh.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mYes
kindNo
nameNo
tableNo
dry_runNo
request_idNo
expected_sha256No

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

This is highly transparent: it discloses whole-query replacement, dry-run behavior, no backup/journal in dry-run mode, SHA-256 concurrency protection, TMDL write requirements, backup/journal/transaction/rollback, and the exact meaning of response flags like parse_checked and m_engine_checked. This goes far beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but every sentence earns its place: core action first, then safety behavior, concurrency control, prerequisites, and response semantics. It is appropriately sized for a complex destructive-looking write operation.

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

Completeness3/5

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

The description covers safety, rollback, response semantics, and prerequisites very well. However, it omits the crucial mapping between kind/name/table and the partition or expression being edited, and request_id is never mentioned. With zero schema parameter descriptions, this is a meaningful completeness gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

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. It explains dry_run and expected_sha256 well, but m, kind, name, table, and request_id are left undocumented, and the description never explains how to target the partition or expression via parameters. An agent would struggle to construct a correct call for a specific object.

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 opens with 'Reemplaza ENTERA la consulta M de una particion o expresion', which names a specific verb, resource, and scope. It also differentiates itself from partial editing and references pbi_get_power_query, making its role in the sibling family clear.

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?

The description gives clear operating context: it requires a .pbip project and Power BI Desktop closed, dry_run is active on first call, and expected_sha256 from pbi_get_power_query should be used to detect concurrent changes. It does not explicitly list when-not-to-use or name alternative tools for partial edits, but the guidance is strong.

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