edit_track
Manage tracks: list | create | update | delete | tighten.
list: current track order with stable ids and aliases (read-only). Use it to refresh aliases before another edit.
create: json {"trackType":"video"|"audio"}, optional "count", "order" (zero-based position), "role", "name", "audioRouting". Video V1 (lowest order) is the back layer and larger V aliases render on top; audio is inverted, A1 is the top lane. New tracks default after existing ones. Use the returned stable ids for follow-up edits, because aliases shift when tracks are inserted.
update: order, hidden, muted, role, name, or audioRouting via json.
delete: removes only an empty track. It is refused while clips, track effects, layouts, zooms, or adjustment clips remain, so move or delete those items first (edit_item deletes). Delete several empty tracks in ONE call with trackIds; refs resolve before anything is removed, so V2 and V3 together is safe. One timeline per batch.
tighten: close gaps by snapping each item to the end of the previous one.
Roles & ducking
Auto-ducking comes from per-track roles, one role per track, set on the track that actually holds the clips (talking-head speech is often V1's embedded audio, not A1; put music below it). "anchor" = speech track whose items trigger ducking; "follower" = music lowered where it overlaps anchor items; "role":null turns ducking off. Use roles instead of item-level music gain for speech clarity. Leave "audioRouting.duckDepthDb" unset so depth follows timeline loudness; pass a negative dB only when the user wants music louder or softer under speech, and null to clear it. Setting "role":"follower" resets duck depth unless you also pass duckDepthDb.
Effects
Effects on tracks (including Linear Mask) are effect items: add or change them with edit_item type:"effect" and their effect item id. edit_track does not edit effect propertyOverrides.
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": {
"action": "<action>"
},
"name": "edit_track"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | No | JSON for create/update, e.g. {"trackType":"video"} or {"trackType":"audio","role":"follower"} or {"role":"anchor"} or {"role":null} or {"audioRouting":{"duckDepthDb":null}} | |
| action | Yes | list, create, update, delete, or tighten. delete only works on empty tracks. | |
| trackId | No | Track alias (V1, A1) or ID (for update/delete/tighten) | |
| trackIds | No | delete: several track aliases/ids removed in one call. Use this instead of repeated single deletes. | |
| projectId | No | Project for this call (full ID or unambiguous prefix). Explicit-timeline calls never change the target of later calls; legacy project selection applies otherwise. | |
| timelineId | No | Timeline id/prefix (from manage_timelines list) to list/create/update/delete/tighten tracks on without switching the active timeline; defaults to the active timeline. Aliases resolve on it; a concrete track id must belong to it. |