scaffold_dax_workspace
Creates a portable DAX workspace folder with a ready-to-run executor script, notebook, query files, and project config so you can run DAX queries against Power BI models from Python.
Instructions
Scaffold a portable DAX workspace folder with a bare-bones executor script.
Creates: run_query.py, notebook.ipynb, queries/.dax, pyproject.toml, README.
STOP — before calling this tool you MUST:
Ask the user: "Where should I save the Python workspace?" and wait for their answer.
Use their answer as output_dir. Do NOT invent a path.
After scaffolding, explain to the user:
What files were created and what each one does
How to run it:
cd <output_dir> && uv run run_query.pyThat they can copy execute_dax() / dax_to_pandas() from run_query.py into any notebook
To edit CONNECTION in run_query.py if it shows placeholder connection values
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": {
"output_dir": "<output_dir>",
"query_text": "<query_text>"
},
"name": "scaffold_dax_workspace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output_dir | Yes | ||
| query_name | No | query | |
| query_text | Yes | ||
| project_name | No | ||
| connection_name | No | ||
| connections_dir | No | Connections |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |