Skip to main content
Glama
pablo-horizun

Horizun PBI MCP

pbi_create_measure

Create or replace a DAX measure in Power BI Desktop or PBIP projects with validation and before/after diff.

Instructions

Crea (o reemplaza con overwrite=true) una medida DAX.

Valida que la tabla exista y que la medida no exista salvo overwrite. data_category: opcional, p.ej. "ImageUrl" para medidas que devuelven un data-URI SVG (Power BI las renderiza como imagen en tablas/matrices). Devuelve el diff antes/despues.

mode='both' esta temporalmente deshabilitado bajo la politica estricta: 'live' necesita Power BI Desktop abierto y 'pbip' lo necesita cerrado, asi que una sola llamada aplicaria solo uno de los dos destinos. Elige 'live' o 'pbip'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNolive
nameYes
tableYes
overwriteNo
expressionYes
request_idNo
descriptionNo
data_categoryNo
format_stringNo
display_folderNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description discloses validation (table exists, measure not exist unless overwrite), the diff return, and the mode constraints requiring Desktop open/closed. It does not mention permission requirements or broader side effects, but the core behavioral traits are covered.

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 a compact paragraph with each sentence providing distinct information: purpose, validation, optional data_category, diff output, and mode restriction. No filler or repetition; front-loaded with the main action.

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?

Given the 10-parameter schema and mode complexities, the description covers the key aspects: validation, overwrite behavior, mode selection, and data_category example. It also mentions the diff return, complementing the output schema. It could mention error cases or prerequisites, but overall it's sufficient for an agent to invoke correctly.

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

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It adds meaning for data_category (with ImageUrl example), mode (disabling both), and overwrite (replacement), but leaves format_string, display_folder, and other parameters unexplained. Still, the core parameters are obvious from the schema titles, so the added semantics is moderately helpful.

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 'Crea (o reemplaza con overwrite=true) una medida DAX', clearly stating it creates or replaces a DAX measure. It also specifies validation behavior and naturally differentiates from update/delete siblings by focusing on creation with overwrite semantics.

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 provides explicit usage context for the mode parameter: 'Elige live o pbip' and explains why mode='both' is disabled. It also clarifies when overwrite=true is relevant, but does not explicitly name alternative tools like pbi_update_measure for comparisons.

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