Skip to main content
Glama

persist_open_model

Persist model edits in an open Power BI Desktop report by applying them to the live model and triggering File>Save, so the .pbix retains the full model and data.

Instructions

DATA-PRESERVING persist for a report OPEN in Power BI Desktop (the loop for a loaded report like a live dashboard): apply the model edits to the connected LIVE model (SaveChanges + a Calculate when a calc column/relationship changed), then drive Desktop's own File>Save (scripted Ctrl+S, located by the session's engine port) so Desktop writes its full model+DATA image back to the .pbix. Works for ANY model including Power Query (M) import models. PREREQUISITE (manual): the .pbix must be OPEN in Power BI Desktop and connected via connect_model - Desktop is the only host that can persist a data-loaded, M-based model to disk. Pass pbixPath so the tool can confirm the save landed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
editsYesJSON array of edit objects, each with an "op"
pbixPathNothe open report's .pbix path (to confirm the save landed; optional)
sessionIdYessessionId from connect_model (a LOCAL Desktop model)
saveRetriesNoscripted File>Save attempts before giving up (default 2)
Behavior4/5

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

With no annotations, the description carries the full burden, and it reveals the exact internal steps: SaveChanges, a conditional Calculate, scripted Ctrl+S via the engine port, and the full model+DATA image write back. It also discloses that it works for any model including M import models. It stops short of discussing failure modes or overwrite risks explicitly, but the write-back behavior is clearly stated.

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?

The description is dense but not bloated; it front-loads the action, clarifies the data-preserving scope, and includes a clearly marked prerequisite. The parentheticals add valuable detail without straying, though it could be slightly shorter.

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?

For a complex mutation tool with no output schema and no annotations, this description is fairly complete: it explains prerequisites, the live-model interaction, the save mechanism, and one parameter's purpose. It lacks explicit return-value or error-handling information, but the saveRetries parameter hints at failure handling.

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 100%, so the baseline is 3. The description adds useful context for pbixPath (to confirm the save landed) and ties sessionId to connect_model, but doesn't elaborate on edits beyond 'JSON array of edit objects each with an op' already in the schema.

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 clearly states the tool's function: applying model edits to the connected live model and then driving Desktop's File>Save to persist the full model+DATA image back to the .pbix. It distinguishes itself from sibling persist_model_edit and save_open_pbix by emphasizing 'DATA-PRESERVING' and the requirement of an open Desktop report.

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 gives explicit when-to-use context ('for a report OPEN in Power BI Desktop... like a live dashboard') and a hard prerequisite: the .pbix must be open and connected via connect_model. It also notes Desktop is the only host that can persist a data-loaded, M-based model, effectively warning not to use it outside Desktop. However, it doesn't name specific alternative tools.

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