Skip to main content
Glama

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

NameRequiredDescriptionDefault
treeYesNested 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"}.
placeNoTarget place (PlaceId or project name). Defaults to the bound/sole connected place.
parentPathYesParent 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)".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / parentPath / description
      Added value: +"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)\"."
    • changedInput schema / properties / tree / description
      Previous value: -"{ className, name?, properties?, children?: [...] } — nested instance spec"New value: +"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\"}."
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare this is a non-read-only, non-destructive, non-idempotent write. The description adds genuinely useful behavior beyond them: the whole build counts as one Studio undo step, and properties that fail to set are skipped silently rather than erroring. It does not mention permission or place-connection requirements, which is the remaining gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences: capability and return values first, then the ideal use case, then the sibling routing rules. Every sentence carries distinct information with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description still tells the agent what comes back (root path and instance count). All three parameters are covered by schema descriptions, and the silent-skip caveat covers the main surprise an agent could hit. Nothing needed to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents tree, parentPath and place, including the typed-wrapper syntax. The description only refers to 'one spec' and implies the root path without adding format or constraint detail beyond the schema, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Build a whole nested hierarchy from one spec') plus the observable outcome ('return the root path and instance count'). It explicitly names the two sibling tools it is not (create_instance, batch), so an agent can distinguish it without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a positive use case ('Best for UIs and models - a panel and all its children at once') and explicit routing rules: single instance goes to create_instance, mixed creates/edits/deletes go to batch. No inference required.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.