Skip to main content
Glama

Trim clip end

trim_clip_end

Trim or extend a clip's end while keeping its start fixed, optionally updating linked clips and ripple-shifting later clips to avoid gaps or overlaps.

Instructions

Move the tail (right edge) of a clip while its start stays where it is; the source out point changes with it. Pass time (new timeline end, seconds) or delta (seconds; negative trims material off, positive extends). Without ripple neighbouring clips do not move and the clip stops growing at the next clip. With ripple=true everything that starts at or after the clip's old end, on all tracks, shifts by the change so the sequence stays in sync (a track where that would make clips collide is left alone and listed in tracks_not_rippled). Extending always stops at the end of the source media. include_linked (default true) trims the linked audio/video clips the same way. Returns the trimmed clip with its real new end.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "trim_clip_end"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeNoNew timeline end of the clip, in seconds.
deltaNoChange of the end in seconds; negative makes the clip shorter.
rippleNoShift all later clips on every track by the change so no gap or overlap appears. Default false.
clip_idNoStable clip id (from get_sequence_structure / list_clips). Preferred.
clip_indexNo0-based index of the clip in its track's clip list, as reported by list_clips / get_sequence_structure. Usually time order, but a moved clip can keep its old index, and indices shift after edits: prefer clip_id.
track_typeNoUsed with track_index + clip_index when clip_id is not given. Default "video".
sequence_idNoStable sequence id (from list_sequences). Omit to use the active sequence.
track_indexNo0-based track index (0 = V1 or A1).
sequence_nameNoSequence name; used only when sequence_id is not given.
include_linkedNoAlso trim the clips linked to this one (the audio of a video clip, or the video of an audio clip). Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare a non-read-only, non-idempotent mutation; the description goes far beyond that by disclosing ripple-affected scope (all tracks, clips starting at or after the old end), the collision fallback reported via tracks_not_rippled, the source-media ceiling on extension, the linked-clip default, and the return value. No contradiction with destructiveHint=false, since trimming here is an edit to timeline placement rather than media destruction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is front-loaded with the core action and its invariant before moving into ripple and linked-clip behavior. It is dense and every sentence carries information, though the single long parenthetical paragraph could be broken up for faster scanning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter mutating tool with no output schema, the definition covers the tricky edges an agent needs: time-vs-delta semantics, ripple side effects across tracks, collision handling, source-length limits, linked clips, and the return value. Nothing material is left to inference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so baseline is 3; the description adds real meaning by presenting time and delta as alternatives and tying ripple and include_linked to observable outcomes. It does not document the clip_id vs clip_index/track_index/track_type selection path, which the schema covers in detail, so it stops short of a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Move the tail (right edge) of a clip while its start stays where it is") and immediately clarifies what stays fixed, which implicitly separates it from the trim_clip_start sibling. It also names the two ways to specify the new end, so an agent knows exactly what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells the agent to pass either time or delta and explains the sign convention, plus the conditions under which ripple should be used and what happens without it. It lacks a direct pointer to trim_clip_start for the opposite operation and doesn't mention when clip_id should be preferred over clip_index in prose, but the usage context is otherwise clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools