Skip to main content
Glama

get_tree

Read-only

Map a Roblox instance hierarchy with minimal tokens: same-class sibling runs fold into single "ClassName ×N" lines so large models stay compact. Start here to understand a place before requesting exact paths.

Instructions

Map the hierarchy under an instance with as few tokens as possible: runs of same-class siblings fold into one "ClassName ×N" line, so a 4,000-part model costs about one line. Read-only. Start here to understand a place or a large model. For exact paths of every descendant use get_descendants; for one instance's properties, tags and children use describe.

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": {
      "path": "<path>"
    },
    "name": "get_tree"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesRoot of the tree to map, e.g. "Workspace" or "StarterGui". 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)".
placeNoTarget place (PlaceId or project name). Defaults to the bound/sole connected place.
maxDepthNoHow many levels below path to include. Default 4.
classNameNoOnly show descendants that are this class or inherit from it, e.g. "BasePart" or "Script".
collapseMinNoFold a run of same-class siblings once it is longer than this. Default 6.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv0.1.1
    • changedInput schema / properties / className / description
      Previous value: -"only show descendants of this class"New value: +"Only show descendants that are this class or inherit from it, e.g. \"BasePart\" or \"Script\"."
    • changedInput schema / properties / collapseMin / description
      Previous value: -"collapse same-class runs longer than this (default 6)"New value: +"Fold a run of same-class siblings once it is longer than this. Default 6."
    • addedInput schema / properties / collapseMin / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / collapseMin / minimum
      Added value: +1
    • changedInput schema / properties / collapseMin / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / maxDepth / description
      Previous value: -"default 4"New value: +"How many levels below path to include. Default 4."
    • addedInput schema / properties / maxDepth / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / maxDepth / minimum
      Added value: +1
    • changedInput schema / properties / maxDepth / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / path / description
      Added value: +"Root of the tree to map, e.g. \"Workspace\" or \"StarterGui\". 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)\"."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint=false, and the description reinforces read-only plus adds genuinely new behavior: same-class sibling runs collapse into a single "ClassName ×N" line, with a concrete example (4,000 parts ≈ one line). It does not address invalid-path handling or exact output line structure, so it stops short of 5.

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, front-loaded with purpose and the token-saving payoff, then usage routing. Every clause carries information; no filler or restated title.

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

Completeness4/5

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

For a 5-parameter read tool with no output schema, the description covers purpose, compression behavior, and alternatives. The main remaining gap is what an actual returned line looks like beyond the collapsed form (e.g., how instance names versus properties appear), which is minor.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description goes further by explaining the collapsing concept that gives collapseMin and maxDepth their real meaning (why you'd tune folding and depth for a large model). It still doesn't clarify how className filtering interacts with collapsing, so it isn't fully additive.

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 ("Map the hierarchy under an instance") and immediately qualifies the scope with the token-efficiency behavior, so it is clearly distinguishable from get_descendants (exact paths) and describe (single instance details) by name.

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 explicit routing: "Start here to understand a place or a large model" for this tool, get_descendants for exact descendant paths, and describe for one instance's properties/tags/children. When-to-use and when-to-use-something-else are both spelled out.

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