Skip to main content
Glama

pbi_patch_layout

Patch modified report layout into the PBIX archive, with forced close and save before overwriting to preserve unsaved changes.

Instructions

Patch the modified Report/Layout back into the PBIX archive.

When force=True the call closes (and if necessary kills) Power BI Desktop so the PBIX can be overwritten. save_before_close (default True) sends Ctrl+S to every running PBI Desktop window via PostMessage before the kill, then waits up to 10 seconds for the PBIX mtime to change. This flushes any in-memory TOM mutations (measures, columns, role filters) that have not yet been persisted — without this, those changes are lost when the process is killed.

The save attempt is best-effort: it never raises, and the layout patch proceeds regardless of whether the save succeeded. The response includes save_attempt with telemetry so the caller can detect silent loss.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
pbix_pathYes
extract_folderYes
include_hiddenNo
save_before_closeNo
fail_on_persistence_riskNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description must carry the burden. It details that force kills Power BI Desktop, save_before_close sends Ctrl+S and waits, and that the save attempt is best-effort. These are important side-effect disclosures. However, it does not explain the fail_on_persistence_risk parameter's behavior.

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 multi-paragraph but well-structured, with clear information flow. Each sentence contributes value, though it could be slightly more concise. The separation of force and save_before_close details is logical.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters, output schema exists), the description covers the critical risky behaviors (force, save before close) and mentions the response includes save_attempt telemetry. However, it omits details on include_hidden and fail_on_persistence_risk, leaving gaps.

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 description coverage is 0%, so the description must compensate. It explains 'force' and 'save_before_close' behavior, but the other four parameters (pbix_path, extract_folder, include_hidden, fail_on_persistence_risk) are not described. This partial coverage adds some meaning but is insufficient for a zero-coverage 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 'Patch the modified Report/Layout back into the PBIX archive.' This is a specific verb-resource combination. Among many pbi_ tools, this one focuses on layout patching, though no explicit sibling differentiation is provided.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not specify when to use this tool over alternatives like pbi_compile_report or pbi_persist_now. It explains internal behavior (force, save_before_close) but lacks guidance on selecting this tool among siblings.

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/imnotStealthy/powerbi-mcp-local'

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