Reorder elements within a clip
reorder_elementsReorder the elements inside a clip. List position IS the z-index — later entries in ordered_element_ids render on top of earlier ones.
You MUST pass the full set of element IDs currently in the clip. The handler rejects partial lists so a reorder can never silently drop an element. Get the current list via get_clip — the order it returns is exactly the order this takes.
Works on grouped clips. Elements keep their group; moving a group's members together moves the whole group relative to everything else. The one thing a group cannot do is render in two pieces, so an order that puts a non-member BETWEEN two members of the same group is rejected and names the group — put the group's elements next to each other, or take the element out of the group first with update_elements(group).
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": {
"project_id": "<project_id>",
"clip_index": "<clip_index>",
"ordered_element_ids": "<ordered_element_ids>"
},
"name": "reorder_elements"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clip_index | Yes | Zero-based clip index. | |
| project_id | Yes | Project ID. | |
| ordered_element_ids | Yes | All element IDs currently in the clip, in the new order. Position N = z-index N (later = on top). |