Skip to main content
Glama

setClipRange

Set a clip's in/out points in source-time seconds to shorten its head or tail, or adjust its crop; only supplied fields change and downstream clips reflow.

Instructions

Set a clip's in/out points (source-time seconds) to shorten its head or tail — distinct from a trim (which cuts a span inside the clip) — and/or its crop. Only the fields you pass are changed. All clips are re-laid back-to-back afterwards, so downstream clips shift automatically. Change the range ONLY when the user explicitly asks to shorten or extend a clip. Do NOT use this for 'remove silences' or 'cut pauses' — for those, use addTrim. cropRegion is the part of the source frame the clip shows, {x, y, width, height} in 0–1 fractions of it, per clip as in the editor's Edit clip; null shows the whole frame again. getCurrentDocument reports it on the clip, absent when the clip shows the whole frame. Two neighbouring clips of the same asset whose source ranges meet and whose crops match are one clip: the result says joinedIntoNeighbour when an edit made them so.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clipIdYes
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.
cropRegionNoThe part of the source frame this clip shows, as 0–1 fractions of it ({x, y, width, height}); null shows the whole frame again.
sourceEndSecNo
sourceStartSecNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.1

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnly=false, destructive=false, openWorld=false; the description goes well beyond by disclosing mutation semantics ("Only the fields you pass are changed"), timeline side effects ("All clips are re-laid back-to-back afterwards, so downstream clips shift automatically"), and a subtle result condition ("joinedIntoNeighbour when an edit made them so"). These are exactly the consequences an agent can't infer from the annotations.

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?

Front-loaded with purpose, then the when/when-not rule, then parameter and return nuances. It is dense and em-dash-heavy but each clause carries distinct information (trim distinction, crop semantics, re-layout behavior, join condition). Slightly packed rather than wasteful.

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?

For a 5-parameter mutation with no output schema and modest schema coverage, the description covers the essential effects: partial update, automatic re-layout, crop reversal, and the join result. It does not cover error/permission behavior or interactions when range and crop are combined in one call, but nothing critical for correct invocation is missing.

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 40%, so the description must compensate, and it does for the two undocumented numeric fields by framing them as in/out points in source-time seconds. cropRegion gets more meaning than the schema gives, including the "null shows the whole frame" reversal behavior and its availability via getCurrentDocument. clipId is left implicit, which is minor but a small gap.

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+resource: "Set a clip's in/out points (source-time seconds) to shorten its head or tail ... and/or its crop." It immediately distinguishes itself from the sibling trim operations by defining a trim as cutting "a span inside the clip." An agent can separate this from setTrim/addTrim/addTrims without opening a 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?

Gives explicit gating ("Change the range ONLY when the user explicitly asks to shorten or extend a clip") plus a named anti-pattern with a redirect: "Do NOT use this for 'remove silences' or 'cut pauses' — for those, use addTrim." This is exactly the when/when-not/alternative structure needed to route correctly.

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