Set Clip Duration
set_clip_durationChange a timeline clip's visible duration by moving only its end while keeping its start fixed. Extend still images beyond import length and apply the edit to linked audio/video partners.
Instructions
Set one timeline clip's visible duration by moving only its timeline end (TrackItem.end) while keeping its start fixed. Pass exactly one of duration_seconds or end_seconds. Works for extending still images past their import length. Refuses to overlap the next clip on the same track, rejects shortening that would strand effect keyframes unless keyframe_policy is preserve, reads start/end back, and restores the original end if Premiere clamps or ignores the write (for example when video media has no handle left). Linked audio/video partners get the same change by default (include_linked), applied as the same end offset so partners with a J/L cut keep their offset; every clip is checked before any is changed. Use this instead of speed changes, which Premiere does not expose to scripting.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node_id | Yes | Node ID of the timeline clip (track item) to resize | |
| end_seconds | No | Target absolute timeline end (out-point) in seconds. Must be at least one frame after the clip's start. Specify exactly one of duration_seconds or end_seconds. | |
| include_linked | No | Also apply the edit to the clip's linked audio/video partners, as Premiere does with linked selection (default: true). | |
| keyframe_policy | No | When shortening, how to handle effect keyframes beyond the new visible length: reject (default) leaves the timeline unchanged; preserve keeps them and reports their count. | |
| duration_seconds | No | Target visible duration in seconds, measured from the clip's current timeline start. Specify exactly one of duration_seconds or end_seconds. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool completed successfully. | |
| data | No | Tool-specific result data when ok is true; on failure, diagnostic detail when the tool provides it. | |
| tool | Yes | The registered MCP tool name. | |
| error | No | Failure detail when ok is false. |