Skip to main content
Glama

setTrim

Move or resize an existing trim range by ID using source-time seconds; cuts follow the new clip, with warnings if zoom transitions are cut.

Instructions

Move or resize an existing trim range by id. Times are source-time seconds. The cut follows to whichever clip the new range lands in, when that clip is unambiguous. A zoom HOLDS over its span: it animates in during the window just before startSec and out during the window just after endSec. Each move lasts 0.6 s + 0.55 s × ln(renderedScale) of SCREEN time (0.72 s at 1.25×, 0.82 s at 1.50×, 0.92 s at 1.80×, 1.03 s at 2.20×, 1.29 s at 3.50×, 1.49 s at 5.00×), so a speed region scales the timeline it covers by its speed: longer above 1×, shorter below. getCurrentDocument gives each zoom's zoomInFromSec and zoomOutUntilSec, in virtual seconds like the zoom. A trim inside either window cuts that move and the export jumps at the cut: leave the windows untrimmed. Two zooms at most 1.5 s apart on screen, on the same clip with no trim between them, are chained: the camera pans from one to the next over 1 s of screen time from the first one's end (panUntilSec), with no zoom-out or zoom-in between them. When the result cuts a zoom's move in or out, it carries cutTransitions: which zoom, which side, cutSec, the timeline seconds of the move lost, and by: trim, or junction when the move runs past its clip's edge into the next clip. It is a warning, nothing is refused: move the cut or the zoom unless a hard cut is what you want.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endSecYes
startSecYes
projectIdNoThe project to act on, from listProjects. Omit it only for the project open in the OpenScreen editor, which works only while the app runs.
trimRangeIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.1

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only say non-readOnly, non-destructive, non-openWorld; the description goes far beyond that. It discloses that the cut follows to whichever clip the new range lands in 'when that clip is unambiguous', that a chained-zoom camera pan lasts 1 s, and that the operation emits a cutTransitions warning where 'nothing is refused', which is exactly the kind of consequence detail an agent needs for a mutation.

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

Conciseness3/5

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

The core purpose is correctly front-loaded, but the body is a dense wall of timing math, including a six-entry renderedScale example list (0.72 s at 1.25× … 1.49 s at 5.00×) that is far more detail than a tool description needs. Signal is real but padded.

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

Completeness4/5

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

No output schema exists, yet the description explains the returned cutTransitions shape (which zoom, which side, cutSec, lost seconds, by: trim/junction), and references getCurrentDocument for zoomInFromSec/zoomOutUntilSec. That covers nearly everything an agent needs to call and interpret the result correctly.

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 only 25% (just projectId documented), so the description must compensate. It does add the critical unit for the two undocumented numerics ('Times are source-time seconds') and ties trimRangeId to 'by id', though it never clarifies ordering/constraints between startSec and endSec or the id's format.

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 pair (move or resize) on a specific resource (an existing trim range) addressed by id. The word 'existing' implicitly distinguishes it from the sibling creators addTrim/addTrims and the remover removeTrim, so an agent can place it without opening any schema.

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

Usage Guidelines3/5

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

Usage is implied by 'existing trim range' (i.e., not for creating or deleting) and there is operational guidance ('leave the windows untrimmed', 'move the cut or the zoom unless a hard cut is what you want'). However, no sibling is named as an explicit alternative and there are no stated preconditions, so the routing is inferred rather than stated.

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