rename_shared_expression
Rename a shared Power Query expression and update all references across the model. Detects conflicting local names to prevent unsafe text rewrites.
Instructions
Rename a shared Power Query expression (parameter / staging query) AND rewrite every #"name" and bare-identifier reference to it across the other shared expressions and table partitions (string literals and comments are never touched). Refuses with the offending document list when another M document declares the same name locally (a let-step or lambda parameter shadows the shared name there, so a text rewrite would be unsafe). Refresh before saving the .pbix.
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": {
"sessionId": "<sessionId>",
"name": "<name>",
"newName": "<newName>"
},
"name": "rename_shared_expression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | current shared expression name | |
| newName | Yes | new name | |
| sessionId | Yes |