Skip to main content
Glama
HorizunGroup

Horizun PBI MCP

Official
by HorizunGroup

pbi_validate_desktop_render

Destructive

Capture a Power BI Desktop report window to confirm it renders with actual data, revealing when a .pbip shows blank visuals from an unrefreshed model.

Instructions

Abre un .pbip/.pbix y captura su ventana real sin depender del foco.

Es la comprobacion visual automatizable que complementa al validador PBIR: espera el modelo, identifica la ventana por PID y hora de inicio, y la renderiza con PrintWindow directamente a outputs/desktop_captures. La captura no activa ni trae Desktop al frente, por lo que no puede fotografiar por accidente otra ventana que tape el informe.

path (o pbip_path, el mismo nombre que devuelve pbi_session_info) se puede omitir: entonces se usa el proyecto .pbip activo.

refresh=true es lo que hace que la captura signifique algo en un .pbip: ese formato guarda la definicion, no los datos, asi que recien abierto el modelo viene VACIO y las tablas y matrices salen en blanco aunque el informe este perfecto. Con refresh se abre, se refresca, se espera a que la ventana deje de repintar y se captura. Ese es tambien el camino para fotografiar OTRA pagina con datos: page exige abrir el proyecto, y al abrirlo hay que volver a refrescar.

Como el refresh modifica de forma irreversible el modelo en memoria, refresh=true exige ademas confirm=true. confirm_reuse autoriza mover una ventana que ya era del usuario; son autorizaciones distintas.

Pase lo que pase, la respuesta lleva data_loaded: si es false, la captura no es representativa del informe, es la foto de un modelo sin datos. Si no se pudo comprobar, se dice; no se afirma ninguna de las dos.

page: captura ESA pagina (id o nombre visible), no la que quedo activa. fit_to_page (activado por defecto): fuerza la vista "Ajustar a la pagina" para que salga el lienzo COMPLETO y no el tercio superior al zoom guardado. Con el proyecto CERRADO (.pbip) ambos se aplican como una vista temporal en disco que se restaura byte a byte al terminar. Con la ventana YA ABIERTA -que es del usuario- se hacen en la propia interfaz, pero SOLO con confirm_reuse=true: elegir una pestaña y cambiar el zoom mueven esa ventana, y una captura que solo debia observar no lo hace por su cuenta. Sin confirm_reuse, page sobre una sesion abierta es un error y fit_to_page degrada a un aviso (se captura al zoom actual). Con el, se elige la pestaña y el zoom por UI Automation y se demuestra el resultado hasta donde se puede (navigation): la pagina por el IsSelected de su pestaña; el zoom solo por el nivel que anuncia Power BI, lo que prueba que el zoom CAMBIO y no que el modo resultante sea "Ajustar a la pagina" -verified_means lo dice en la propia respuesta-. Si la pagina no se pudo demostrar, la tool falla en vez de capturar otra; si el zoom no se pudo demostrar, lo dice en warnings. Nunca toca pages.json de un proyecto abierto.

La captura separa cuatro señales que no son la misma cosa: capture.identity_settled (la ventana muestra ESTE documento), capture.frame_settled (la imagen dejo de cambiar), data_loaded (el modelo tiene filas) y capture.frame_uniform (la imagen es casi de un solo color: pagina vacia o visuales sin pintar). capture.capture_representative resume las tres primeras.

data_loaded habla de lo que muestra la VENTANA, no solo del motor: canvas lee por UI Automation los avisos de Power BI ("es necesario actualizar manualmente", "datos incompletos") y los valores «(En blanco)». Si Power BI avisa de que faltan datos, data_loaded es false aunque el motor tenga filas -van en model_data_loaded- y la captura deja de ser representativa. Con refresh=true se espera a que esos avisos desaparezcan antes de capturar (canvas.wait_after_refresh). En un .pbip con la pagina conocida se espera ademas a que se vean los titulos de sus visuales: si no aparecen todos, canvas.state es visuals_not_painted y la captura tampoco es representativa. canvas.state="no_blank_signals" no demuestra datos pintados: solo que no se vio lo contrario; unknown es que no se pudo leer.

"Ajustar a la pagina" en una sesion YA ABIERTA no necesita confirm_reuse si esa ventana la abrio este mismo servidor (p. ej. con pbi_open_and_refresh) o si la llamada trae refresh=true y confirm=true. navigation/authorized_by dice cual fue.

Si la tool tuvo que abrir Desktop, lo cierra al terminar (tambien si la captura falla) y devuelve la seleccion de modelo a como estaba. Si el informe ya estaba abierto, reutiliza esa sesion y nunca cierra la ventana del usuario.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
pathNo
confirmNo
refreshNo
timeoutNo
pbip_pathNo
request_idNo
reuse_openNo
fit_to_pageNo
project_pathNo
confirm_reuseNo
capture_timeoutNo
refresh_timeout_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.1.1
    • addedInput schema / properties / confirm
      Added value: +{
      +  "default": false,
      +  "title": "Confirm",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / confirm_reuse
      Added value: +{
      +  "default": false,
      +  "title": "Confirm Reuse",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / project_path
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Project Path"
      +}
    • addedInput schema / properties / request_id
      Added value: +{
      +  "default": "",
      +  "title": "Request Id",
      +  "type": "string"
      +}
  2. Changed7 schema fields changedv2.0.2
    • addedInput schema / properties / path / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / path / default
      Added value: +null
    • removedInput schema / properties / path / type
      Removed value: -"string"
    • addedInput schema / properties / pbip_path
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Pbip Path"
      +}
    • addedInput schema / properties / refresh
      Added value: +{
      +  "default": false,
      +  "title": "Refresh",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / refresh_timeout_seconds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Refresh Timeout Seconds"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "path"
      -]
  3. Changed2 schema fields changedv1.5.1
    • addedInput schema / properties / fit_to_page
      Added value: +{
      +  "default": true,
      +  "title": "Fit To Page",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / page
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Page"
      +}
  4. First observedv1.0.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, and the description corroborates this by stating refresh irreversibly modifies the in-memory model and requires confirm=true. Beyond that it discloses rich behavior: the four separate capture signals, data_loaded semantics (window vs engine), canvas warnings, navigation verification limits, warnings vs failure behavior, and that a Desktop it opened is closed and model selection restored.

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?

It is long and dense, but the length is largely justified by a 13-param, mutation-capable tool with nuanced authorization rules, and the key routing (refresh meaning, confirm requirements) is front-loaded. A few passages restate the same authorization point, so it is not maximally tight.

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

Completeness5/5

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

Given an output schema exists, the description need not restate return values, yet it usefully explains the semantics of data_loaded, navigation, verified_means, and canvas.state that the agent needs to interpret the result. Nothing an agent needs to call this correctly is missing.

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% across 13 parameters, so the description carries the load and adds real meaning for path/pbip_path (interchangeable, defaults to active project), refresh, confirm, confirm_reuse, page, and fit_to_page. However timeout, capture_timeout, refresh_timeout_seconds, request_id, reuse_open, and project_path get no explanation, leaving roughly half the parameters undocumented.

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 states a specific verb+resource: opening a .pbip/.pbix and capturing its real window without depending on focus, and positions it as the automated visual check complementing the PBIR validator. An agent can distinguish this from siblings like pbi_validate_pbip_project or pbi_open_and_refresh.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly explains when refresh=true is required and why (a .pbip stores definition, not data, so the model comes up empty), that refresh=true requires confirm=true, and that confirm_reuse is a distinct authorization for touching a user-owned window. It names the sibling validator it complements and the alternative path for capturing another page.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools