Skip to main content
Glama

edit_measure_offline

Add or edit a DAX measure in a closed Power BI .pbix file, scripting Power BI Desktop's save to persist the change back to disk.

Instructions

Add or edit a measure on a CLOSED .pbix and save it back to disk. Briefly opens the file in the local Power BI Desktop (a Desktop window appears), adds/updates the measure via TOM, then drives Desktop's own File > Save (scripted Ctrl+S) so the change lands in the .pbix, and closes Desktop. An existing measure is updated (omit a field to keep it); a new one needs expression. Reports the before/after expression, format string and display folder, and whether the disk save was confirmed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesmeasure name
tableYeshome table of the measure
pbixPathYespath to the closed .pbix
expressionNoDAX expression (required to create a new measure; omit to keep an existing one)
timeoutSecNoseconds to wait for the model to load before giving up (default 180)
saveRetriesNoscripted File > Save attempts before giving up (default 3)
formatStringNoformat string, e.g. "#,0" or "0.0%" (omit to keep)
displayFolderNodisplay folder (omit to keep)
Behavior5/5

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

With no annotations provided, the description carries the full burden and delivers comprehensively. It discloses that the file is briefly opened in local Power BI Desktop, changes are made via TOM, saving is driven by scripted Ctrl+S, and Desktop is closed afterward. It also specifies the report output (before/after expression, format string, display folder, and disk-save confirmation). This is unusually transparent about side effects and behavior.

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. The first sentence states the core purpose, the middle explains the mechanism and side effects, and the final sentence covers behavioral distinctions and reporting. It is front-loaded with the most important information and contains no filler or redundant restatements of the tool name.

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?

Despite having 8 parameters and no output schema, the description provides enough context to use the tool effectively: it explains the offline workflow, the side effect of opening Desktop, the create-vs-update semantics, and what the tool returns. Combined with the 100% schema coverage, this is a fully self-contained description.

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

Parameters5/5

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

Schema description coverage is 100%, so the baseline is 3, but the description adds significant meaning beyond the schema: it explains the conditional semantics for expression ('a new one needs expression') and the update behavior for formatString/displayFolder ('omit a field to keep it'). This directly clarifies non-obvious parameter interactions that the schema alone does not convey.

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 a specific verb+resource statement: 'Add or edit a measure on a CLOSED .pbix and save it back to disk.' This clearly distinguishes it from sibling tools like add_measure or update_measure by emphasizing the closed file state and the save-back behavior. The mechanism (opens Power BI Desktop, uses TOM, saves scripted Ctrl+S) further clarifies the tool's unique scope.

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 clearly indicates when to use: 'on a CLOSED .pbix', and explains the resulting behavior (Desktop window appears, file is saved). It also covers the distinction between creating a new measure (needs expression) and updating an existing one (omit fields to keep). However, it does not explicitly name alternative tools or state when not to use it, so it stops short of full usage-versus-alternatives guidance.

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