Skip to main content
Glama

add_measure

Add a DAX measure to a Power BI table, committing it to the live model or writing offline to a PBIP semantic model's TMDL.

Instructions

Add a DAX measure to a table. Commits to the live model (persist with File > Save in Desktop). target=pbip: pass pbipFolder instead of sessionId to write the measure OFFLINE into a PBIP semantic model's TMDL (no engine; collision-checked, /// doc comments preserved).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daxNoDAX expression, e.g. SUM(Sales[Amount])
nameNomeasure name
tableNohome table for the measure
sessionIdNosessionId from connect_model (live engine; pass exactly one of sessionId / pbipFolder)
pbipFolderNotarget=pbip: a PBIP <name>.SemanticModel / TMDL definition folder to edit OFFLINE (engine-free)
descriptionNodescription
formatStringNoformat string, e.g. "#,0" or "0.0%"
displayFolderNodisplay folder
Behavior5/5

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

With no annotations provided, the description carries full burden and delivers rich behavioral detail: commits to the live model, requires File > Save to persist, and the PBIP mode is engine-free, collision-checked, and preserves /// doc comments. This goes well beyond the schema and gives essential safety and side-effect information.

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?

Three sentences pack the core action, live-model commit caveat, and offline mode details with zero fluff. The structure is front-loaded with the primary purpose, making it easy to scan and digest.

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 tool has 8 parameters, no annotations, and no output schema. The description covers both operational modes, the persistence caveat, and key offline behaviors. It could mention potential errors or prerequisites (e.g., needing a connected model), but given schema richness, this is fairly complete.

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 coverage is 100%, so baseline is 3. The description adds meaning by clarifying the sessionId vs. pbipFolder exclusivity and introduces extra behavioral context for the pbipFolder parameter (collision-checked, doc comments preserved). This enhances parameter understanding beyond the schema definitions.

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?

Description clearly states 'Add a DAX measure to a table' with a specific verb and resource, and it distinguishes the two operating modes (live vs. offline PBIP). This differentiates it from sibling tools like update_measure or delete_measure, making the purpose unmistakable.

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 provides clear context for when to use each mode: live model with sessionId, or offline PBIP with pbipFolder. It states the persistence requirement for the live model ('persist with File > Save in Desktop') and the offline nature of the PBIP mode. However, it does not explicitly name alternative tools (e.g., update_measure for modifications), so it falls short of the top criterion.

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/cyphonica/powerbi-pbix-mcp'

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