clip_set_duration
Set a timeline clip's duration by moving its tail edit point within the available source media, so you can lengthen or shorten an edit without re-placing the clip.
Instructions
Set a timeline item's duration by moving its tail edit point within the available source media (native SetRightOffset).
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": {
"durationFrames": "<durationFrames>"
},
"name": "clip_set_duration"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| itemId | No | Timeline item unique id (from timeline_get_clips) | |
| confirm | No | Only needed on Resolve < 21, where this falls back to a destructive re-placement | |
| timeline | No | Timeline name or id (default: current timeline) | |
| itemIndex | No | 1-based position of the clip on the track (transitions are not counted) | |
| trackType | No | video | |
| trackIndex | No | ||
| durationFrames | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True only when DaVinci Resolve confirmed the operation. | |
| data | No | ||
| tool | Yes | ||
| error | No | ||
| source | No | Where the result came from: the real DaVinci Resolve, the mock adapter (tests), or the server alone. | |
| status | Yes | ||
| message | Yes | ||
| warnings | Yes |