create_tree
Build a complete nested instance hierarchy under a parent from a single JSON spec in one call and one undo step, returning the root path and instance count for UIs and models.
Instructions
Build a whole nested hierarchy from one spec in a single call and one Studio undo step, and return the root path and instance count. Best for UIs and models (a panel and all its children at once). Properties that fail to set are skipped silently. For one instance use create_instance; for mixed creates, edits and deletes use batch.
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": {
"parentPath": "<parentPath>",
"tree": "<tree>"
},
"name": "create_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tree | Yes | Nested spec: { className, name?, properties?, children?: [spec, ...] }. A JSON string of the same shape is also accepted. Property values: Write a primitive (string, number, boolean) or a typed wrapper: {Vector3:[x,y,z]}, {Color3:[r,g,b]} (0-1), {UDim2:[xScale,xOffset,yScale,yOffset]}, {CFrame:[x,y,z] or all 12 components}, {EnumItem:"Enum.Material.Wood"}, {BrickColor:"Bright red"}. | |
| place | No | Target place (PlaceId or project name). Defaults to the bound/sole connected place. | |
| parentPath | Yes | Parent to build the tree under. Dot path from the DataModel root, e.g. "Workspace.Map.Door" or "StarterGui.HUD.Frame". A leading "game." is optional; a duplicate sibling name takes the suffix Tufan prints, e.g. "Part (2)". |