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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pbixPath": "<pbixPath>",
"newM": "<newM>"
},
"name": "update_power_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| newM | Yes | the full replacement Section1.m document | |
| pbixPath | Yes | absolute path to the .pbix (a COPY) |