Trim layer
trim_layerShortens a video layer by cutting seconds from its start or end or keeping a timeline range, commits the edit immediately, and closes gaps on single-source cut timelines.
Instructions
Deterministic edit: shorten a layer, committed immediately. Either a relative trim (edge "start" | "end" + seconds to remove) or an absolute range in TIMELINE seconds (start_time + end_time: the part of the layer's current window to keep). On a single-source cut timeline the trim ripples later segments closed. A trim that removes nothing is an error (NO_CHANGE).
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>",
"layer_id": "<layer_id>"
},
"name": "trim_layer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edge | No | [relative] Which edge to trim. | |
| seconds | No | [relative] Seconds to remove from that edge (> 0). | |
| end_time | No | [absolute] Range end, timeline seconds (> start_time). | |
| layer_id | Yes | Id of the layer to trim. | |
| project_id | Yes | Project whose committed scene is edited. | |
| start_time | No | [absolute] Range start, timeline seconds (>= 0). |