Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/nnaridz/RbxGenie/llms.txt

Use this file to discover all available pages before exploring further.

Description

Returns the children of a specified instance. You can optionally request recursive traversal to get all descendants, or just immediate children. Each child includes its path, name, class name, and child count.

HTTP Endpoint

POST /tool/get_instance_children

Request Parameters

path
string
required
Path to the parent instance. Examples: "Workspace", "ReplicatedStorage.Items"
recursive
boolean
default:"false"
If true, returns all descendants recursively. If false, returns only immediate children.
limit
number
default:"200"
Maximum number of children to return (only applies when recursive=true)

Response Format

children
array
Array of child instances
count
number
Number of children returned
truncated
boolean
True if results were truncated due to limit (only in recursive mode)
error
string
Error message if path resolution failed

Example

// Get immediate children only
const response = await fetch('http://127.0.0.1:7766/tool/get_instance_children', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    path: 'ReplicatedStorage',
    recursive: false
  })
});

const data = await response.json();
console.log(data.result);

// Example output:
// {
//   "children": [
//     {
//       "path": "ReplicatedStorage.Items",
//       "name": "Items",
//       "className": "Folder",
//       "childCount": 5
//     },
//     {
//       "path": "ReplicatedStorage.Modules",
//       "name": "Modules",
//       "className": "Folder",
//       "childCount": 8
//     }
//   ],
//   "count": 2
// }

// Get all descendants recursively
const recursive = await fetch('http://127.0.0.1:7766/tool/get_instance_children', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    path: 'ReplicatedStorage.Items',
    recursive: true,
    limit: 100
  })
});

Implementation Details

From InstanceTools.lua:194-233:
  • Non-recursive mode returns immediate children using GetChildren()
  • Recursive mode traverses all descendants
  • Limit only applies in recursive mode
  • Returns full paths using buildPath()