save_template_model
Rewrites a closed .pbit template's ZIP with current DataModelSchema, preserving all other parts. Re-packs in place with .bak backup or saves an edited copy to a chosen path.
Instructions
Rewrite a closed .pbit template's ZIP with the current DataModelSchema, preserving every other part (Report/Layout, [Content_Types].xml, SecurityBindings, Version, etc.) byte-for-byte - no Power BI Desktop. With no outPath it re-packs in place (the original is copied to a .bak first); with an outPath it writes an edited copy there and leaves the source untouched. The edit tools already persist on each call, so this is the explicit save-as (or an integrity re-pack).
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": {
"pbitPath": "<pbitPath>"
},
"name": "save_template_model"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| outPath | No | optional destination .pbit for a save-as copy (omit to re-pack in place) | |
| pbitPath | Yes | path to the closed .pbit template |