Reparent Node
node_insert_childReparent a node to a new parent, optionally specifying its index among siblings.
Instructions
Reparent a node under a new parent at an optional index. Valid range is 0 to parent's child count. Omit index to append.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | Position in parent's children array (default: append). The output index reports the actual resolved position (same-parent reorder shifts indices). | |
| childId | Yes | ID of the child node to reparent | |
| parentId | Yes | ID of the new parent node | |
| childNodeName | Yes | Name of the child node to verify against | |
| parentNodeName | Yes | Name of the parent node to verify against |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | Index at which the child was inserted | |
| childId | Yes | ID of the reparented child node | |
| newParentId | Yes | ID of the new parent node |