Create or update a Power BI semantic model (dry run by default)
create_semantic_modelCreates a Fabric semantic model item from semantic_model_draft's TMDL (Direct Lake), or updates the item of that name in place. Requires workspace, source and name; SemanticModel.ReadWrite.All or Item.ReadWrite.All and Contributor on the workspace. Returns JSON with the parts and the REST call; with dry_run=false also the result, or kind consent. Changes Fabric only with dry_run=false: an update replaces the model's definition, so tables, relationships and measures added outside the plan leave it; no item is deleted. Errors: {error, kind, hint}.
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": {
"workspace": "<workspace>",
"source": "<source>",
"name": "<name>"
},
"name": "create_semantic_model"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | No | Primary keys replacing the inferred ones. Default: inferred. Example: {"order_items": ["order_id", "line_no"]}. | |
| name | Yes | Display name of the semantic model item; an existing item with this name is updated in place. Example: "shop_model". | |
| schema | No | Schema in the source. Default "dbo". | dbo |
| source | Yes | Lakehouse, warehouse or SQL database, name or id. | |
| tables | No | Exact table names to include. Default all. | |
| dry_run | No | true (default) returns what would be created and the REST calls, changing nothing; false creates or updates. | |
| confirmed | No | Relationships the user confirmed, added to the plan. Default none. Example: [{"source": "orders", "source_cols": ["ship_to_id"], "target": "addresses", "target_cols": ["address_id"]}]. | |
| workspace | Yes | Fabric workspace, name or id. |