edit_item
Add, update, or delete timeline items: video (incl. B-roll), audio, image, gif, svg, motion-graphic, and attached effect / transition items. Pass one or more of adds, updates, deletes; each parameter description lists its entry fields. The batch commits atomically and one invalid entry rolls back all of it, so bundle related ops (delete+add swap, update+add reposition, chained alignTo:"track-end" splices) in one call.
Placement
Preserve existing positions by default. Use
ripple:truewhen the intent is to insert, make room, shift later items, or close gaps; do not use it merely because an overlap happened. "Move to 5s" alone is not ripple.Omit
trackIdto let auto-placement pick a non-overlapping track (V1 is the back layer). If the user names an exact track and the range overlaps, do not silently move other items: ask, or compare options withvalidateOnly:true(a dry run; never with ripple).Items on a non-active timeline need
timelineIdon each entry.Effects, transitions, and
fromItemIdmust reference committed items: add a clip first, then attach to the id the result returns.
Units
Timeline start and length are integer frames (fromFrame, durationInFrames) or time strings (from:"5s", duration:"3s"). sourceStartFromInSeconds and every fade are seconds, not frames. decibelAdjustment is dB (0 unchanged, -60 silent); volume / audioVolume are 0–1 linear only. Layout is canvas pixels, and visual items keep their source aspect ratio: use fit, or pass only one of width/height.
Other tools
Which spoken words, sentences, or takes play → Script (
read_script→ edittimeline.md→apply_script).Do not use
edit_itemfor captions: they are not items. Useedit_captions/read_captions.Title cards, backgrounds, color mattes → opaque Motion Graphics; existing legacy
solidand text items can only be deleted. MG templates →manage_template action:"apply". Music ducking →edit_trackroles.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "edit_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adds | No | Items, effects, and transitions to create. Entry: type ("video"|"audio"|"image"|"gif"|"svg"|"motion-graphic"|"effect"|"transition") + assetId, or fromItemId to duplicate a committed item. Asset type must match: a video with embedded audio stays type "video". Start: fromFrame (integer frame) or from ("5s"), or alignTo:"track-end"|"timeline-end"; optional trackId ("V1", "A1"). Length: durationInFrames, or duration as a time string ("3s"), never a bare number; required for image/gif/svg, otherwise the asset length. Source trim (video/audio/gif): sourceStartFromInSeconds, seconds into the source; the range must stay inside the asset and its end follows from the length (no startFrame, trimIn, or sourceRange). Layout (visual): left/top/width/height or right/bottom insets, in canvas pixels, one anchor per axis; fit:"cover"|"contain" fits the source into that box (or the canvas), derives crop* from the full source frame and replaces any crop; cropTop/cropBottom/cropLeft/cropRight 0–1 for a manual crop without fit; opacity 0–1; rotation in degrees; borderRadius. Width/height are aspect-locked: pass both only with fit, otherwise pass one. There is no scale, end-position, or layout-effect field; split screen and picture-in-picture are boxes on each item. Audio: decibelAdjustment in dB (-60 mutes); playbackRate (audio/gif/video). Fades are seconds, not frames: fadeIn/fadeOut (opacity; volume on audio-only items), audioFadeIn/audioFadeOut (volume). A 60-frame fade at 30fps is audioFadeOut:2 or audioFadeOutDurationInFrames:60, never audioFadeOut:60. Effect on a clip: {type:"effect", assetId, targetItemId} (not motion-graphic), optional fromFrame/durationInFrames for part of it; on a track range: {type:"effect", assetId, trackId, fromFrame, durationInFrames}. LUT effects take propertyOverrides {intensity:0–1}. Transition: {type:"transition", assetId:"builtin:tr-cross-dissolve" or another builtin:tr-* id, outgoingItemId, incomingItemId, durationInFrames}; both clips need source beyond the cut, and it replaces a same-kind transition on that seam. | |
| json | No | Legacy JSON string wrapper for adds/updates/deletes; pass those parameters directly instead. | |
| ripple | No | Shift later items to insert, make room, or close gaps. | |
| deletes | No | Items to delete: [{id}], or {id, type:"effect"|"transition"} for attached items; add timelineId for a non-active timeline. Transitions attached to a deleted item are deleted with it. | |
| updates | No | Existing items, effects, and transitions to change. Entry: id (prefix from preview_timeline) plus only the changed fields. Timeline: fromFrame, fromDeltaFrames, trackId (omit to keep the track, or to let only this item move off an overlap), durationInFrames, sourceStartFromInSeconds. Layout, audio, and fade fields as in adds; volume/audioVolume are 0–1 linear aliases only. Motion Graphic propertyOverrides merge per key (null removes a key, propertyOverrides:null clears all); find keys with inspect_item. type, assetId, and fromItemId are immutable: swap media with deletes + adds and carry over the timing and layout to keep. Shortening an MG item cuts its animation; regenerate the MG for a new length. | |
| projectId | No | Full project UUID. Required for external browser work; internal agents may omit. Execution/explicit-timeline calls never change later calls' target. | |
| timelineId | No | Full timeline UUID, not a prefix. Required for browser work, even unplaced assets. Get it from read_project or manage_timelines action="list". Never switches visible timeline. | |
| validateOnly | No | Dry run: validate and plan without committing. Not with ripple. | |
| idempotencyKey | No | Stable key for this browser execution. Reuse only with identical scope and parameters after a lost acknowledgement; applies only to this call. | |
| browserProfileId | No | Optional browser profile override. Omit to select automatically; do not ask the user to choose. |