edit_timeline
Apply ordered layer and frame edits—add, move, rename or delete layers, and insert, remove, label or shift frames and keyframes—to an Adobe Animate timeline in one batch.
Instructions
Edit layers (addLayer, deleteLayer, moveLayer, renameLayer, setLayerType) and frames (insertFrames, removeFrames, insertKeyframe, clearKeyframe, setLabel, setSpanLength, shiftLayerFrames) in order. Layer references use a name and optional zero-based index; frame numbers are 1-based. shiftLayerFrames moves one layer's full content later without shifting other layers; it uses cut/paste (overwrites the clipboard, and if it fails midway the layer may be left changed: undo in Animate). Stops at the first failed op. deleteLayer and removeFrames require confirm: true. Tween interiors reject frame insertion/removal/keyframe changes. Always run export_scripts again before editing or applying scripts.
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": {
"timeline": "<timeline>",
"ops": "<ops>"
},
"name": "edit_timeline"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ops | Yes | ||
| document | No | ||
| timeline | Yes | Scene index (0-based number) or library item path (string) |