Skip to main content
Glama

edit_model_offline

Apply structural edits to a Power BI TMDL model offline, preserving measures, relationships, and partitions. Ideal for template editing and source control workflows.

Instructions

STRUCTURE-ONLY offline model edit (NO Power BI Desktop, NO live engine): deserialize a TMDL model (a definition/ folder or a PBIP .SemanticModel - the model half export_tmdl / generate_pbip / unpack_to_source produce), apply the edits to the object tree, and re-serialize edited TMDL to outputFolder. The model STRUCTURE (measures, relationships, calc columns, tables, partition definitions) round-trips exactly. DATA IS NOT PRESERVED: TMDL carries no compressed VertiPaq data, so import (M) tables come back empty until a refresh. Use this for template / thin-model edits and source-control workflows. For a DATA-preserving edit of a loaded report use persist_model_edit (offline, M-free) or persist_open_model (Desktop). NOTE: a cold data .pbix that imports via M cannot be read offline - first export its model with export_tmdl from a live session, then edit that folder here.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
editsYesJSON array of edit objects, each with an "op"
tmdlFolderYesa TMDL definition folder, a PBIP <name>.SemanticModel, or a project folder containing one
outputFolderYesoutput folder for the edited TMDL (created/overwritten)
Behavior5/5

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

With no annotations provided, the description fully discloses key behaviors: data is not preserved, M tables return empty until refresh, structure round-trips exactly, and offline cold .pbix cannot be read. It also clarifies that no Power BI Desktop or live engine is involved.

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?

Despite being lengthy, every sentence adds value. It is front-loaded with the core constraint ('STRUCTURE-ONLY... NO Power BI Desktop, NO live engine') and organized with clear warnings and usage guidance. No fluff.

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 description covers purpose, behavior, limitations, and alternatives comprehensively. The only gap is not detailing the expected format of the 'edits' parameter, but the schema already provides a baseline and this is a minor omission given the complexity.

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% for all three parameters, so the baseline is 3. The description adds limited context about tmdlFolder being produced by export_tmdl/generate_pbip/unpack_to_source, but does not elaborate on the edits JSON structure beyond the schema's 'op' mention.

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 'STRUCTURE-ONLY offline model edit' and outlines the full deserialize-edit-reserialize workflow. It explicitly contrasts with sibling tools persist_model_edit and persist_open_model, making the tool's unique niche clear.

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?

States exactly when to use this tool ('Use this for template / thin-model edits and source-control workflows') and names alternatives for data-preserving edits. The NOTE about cold .pbix files provides a critical prerequisite, guiding correct selection.

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