Set video layer trim
set_video_layer_trimPatch a video layer's trim window: source_in_frame (frame in source to start), source_out_frame (frame in source to stop, or null for natural end), timeline_start_frame (where on the project timeline the slice begins). Only the fields you pass are changed. Use this to clip out a segment of a source mp4: duplicate the layer first (in the editor) so you have two pointing at the same clip, then set disjoint source windows.
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": {
"elementId": "<elementId>",
"projectId": "<projectId>"
},
"name": "set_video_layer_trim"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| elementId | Yes | video.<id> of the layer to trim. | |
| projectId | Yes | Opaque project id (a v4 UUID, from list_projects/create_project). Selects which existing project this call mutates. | |
| source_in_frame | No | Frame in the source mp4 where playback begins (0-indexed, 30 fps). | |
| source_out_frame | No | Frame in the source mp4 where playback stops, or null to clear and play to the source's natural end. | |
| timeline_start_frame | No | Project-timeline frame where this slice begins playing. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the call succeeded. | |
| data | No | The payload, shaped by the tool. | |
| note | No | What to do next when not ready. | |
| error | No | Why it failed. | |
| status | No | For cache-backed readers: whether the answer was ready. | |
| editorUrl | No | Opens this project in the editor. |