Skip to main content
Glama

update_power_query

Replace the entire Power Query M document in a .pbix file with new M code. Use on a closed copy of the file to safely edit DataMashup, while clearing permission bindings for recomputation.

Instructions

Replace the ENTIRE Section1.m (the full 'section Section1; shared Query = ...;' document) inside a .pbix's DataMashup, clearing PermissionBindings (Desktop recomputes the SHA-256 on open). RISKY - work on a COPY; the .pbix must be CLOSED in Desktop; refuses protected client paths.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
newMYesthe full replacement Section1.m document
pbixPathYesabsolute path to the .pbix (a COPY)
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 excels. It discloses the destructive side effect (replaces the entire Section1.m), the permission-clearing behavior, the SHA-256 recomputation on open, and the requirement that the file be closed. The 'RISKY' warning and refusal of protected paths add critical behavioral context for an agent.

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?

Two dense sentences that front-load the primary action ('Replace the ENTIRE Section1.m') and then pack essential warnings and constraints. Every clause earns its place; there is no filler or repetition of obvious details. The structure is highly effective for an agent scanning descriptions.

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?

For a high-risk mutation tool with no annotations and no output schema, the description is remarkably complete. It covers the target resource, the exact replacement semantics, side effects, prerequisites (closed file, copy), and an exclusion (protected paths). An agent has sufficient context to decide whether to invoke it and how to prepare safely.

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 100% (both pbixPath and newM have descriptions), so the baseline is 3. The tool description reinforces that newM is the 'full replacement Section1.m document' and pbixPath is 'a COPY', but these details are already present in the schema. No additional parameter semantics are added beyond what the structured field descriptions provide.

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 ('Replace') and defines the exact scope: the ENTIRE Section1.m document inside the .pbix's DataMashup, including the full 'section Section1; shared Query = ...;' document. This clearly distinguishes it from sibling tools like extract_power_query (which reads) and set_partition_m (which likely targets a different component).

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?

Provides clear usage context and constraints: work on a COPY, .pbix must be CLOSED in Desktop, and it refuses protected client paths. These are explicit when-to-use and when-not-to-use conditions. However, it doesn't mention alternatives or explicitly compare to other tools like extract_power_query, so it misses the 'alternatives' part of the top score.

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