Skip to main content
Glama

addTrim

Add one source-time trim range to cut silence or unwanted footage inside a clip without splitting it, preserving placed clips while removing that span from playback and export.

Instructions

Add ONE trim range: a cut of a span inside a clip (this source-time span will not be played or exported) that does NOT split the clip. Times are in seconds of the asset's source time. This is the preferred (and for 'remove silences' requests, the only) way to handle silences; it preserves the user's placed clips and only adds a cut. When you have several cuts to make, use addTrims and send them together — this one is for a single cut or a later correction. A cut belongs to ONE clip: clipId is inferred when a single clip covers the range, but when several clips draw on the same asset over it the call FAILS and lists them — pass the clipId you mean (ids come from getCurrentDocument). 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
clipIdNo
endSecYes
reasonNo
assetIdNo
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnlyHint=false, openWorldHint=false, destructiveHint=false). The description goes far beyond them: it discloses the multi-clip failure mode with its error listing, the zoom 'hold' chaining behavior, the getCurrentDocument source for ids, and the cutTransitions warning shape (which zoom, side, cutSec, time lost, cause). Nothing here contradicts destructiveHint=false — the span is excluded from playback/export but nothing is refused or removed.

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 purpose sentence is correctly front-loaded, but the body is a dense wall of text — the zoom-move duration formula and the numeric table (0.72 s at 1.25x, 0.82 s at 1.50x...) are far more detail than an agent needs to select or invoke this tool, even accepting that zoom interaction and cutTransitions are genuinely relevant. Relevant substance, poorly budgeted.

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?

With no output schema, the description correctly carries the burden of explaining returns and does so for the cutTransitions warning, plus it covers the multi-clip failure mode and zoom interaction edge cases. Gaps remain around assetId/reason and the general shape of a successful return, but the invocation-critical context is present.

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 17% (just projectId), so the description must compensate — and it does for the critical ones: startSec/endSec are 'seconds of the asset's source time' and clipId inference rules are fully explained with the failure case. However, assetId and reason are never addressed anywhere, leaving two of six parameters semantically unexplained.

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?

The very first sentence states a specific verb and resource ('Add ONE trim range: a cut of a span inside a clip') and immediately clarifies the key defining behavior: it does NOT split the clip. It is trivially distinguishable from siblings like addTrims, setTrim, and removeTrim, and even from removeSilences-style intent by naming itself the preferred path. An agent knows exactly what this does without opening the schema.

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

Usage Guidelines5/5

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

Explicit routing rules: use addTrims when you have several cuts to make, and addTrim for a single cut or a later correction; it is also stated as the only way to handle 'remove silences' requests. The clipId ambiguity case is spelled out with the condition under which the call FAILS and what to pass instead. Usage conditions and the alternative are both named.

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