Skip to main content
Glama

Trim layer

trim_layer
Destructive

Shortens a video layer by cutting seconds from its start or end or keeping a timeline range, commits the edit immediately, and closes gaps on single-source cut timelines.

Instructions

Deterministic edit: shorten a layer, committed immediately. Either a relative trim (edge "start" | "end" + seconds to remove) or an absolute range in TIMELINE seconds (start_time + end_time: the part of the layer's current window to keep). On a single-source cut timeline the trim ripples later segments closed. A trim that removes nothing is an error (NO_CHANGE).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_id": "<project_id>",
      "layer_id": "<layer_id>"
    },
    "name": "trim_layer"
  }
}

Input Schema

NameRequiredDescriptionDefault
edgeNo[relative] Which edge to trim.
secondsNo[relative] Seconds to remove from that edge (> 0).
end_timeNo[absolute] Range end, timeline seconds (> start_time).
layer_idYesId of the layer to trim.
project_idYesProject whose committed scene is edited.
start_timeNo[absolute] Range start, timeline seconds (>= 0).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the write nature is known. The description adds genuinely non-obvious behavior: the edit commits immediately (no staging/undo), ripples close later segments on a single-source cut timeline, and a zero-length trim errors with NO_CHANGE. It still doesn't state reversibility or permission requirements, so not a 5.

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?

Three sentences, front-loaded with the action and commit semantics before the mode and edge-case details. The bracketed mode tags make it scannable, though the middle sentence is dense enough that a light rewrite could improve it.

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 destructive, single-object edit tool with no output schema, the description covers modes, side effects (ripple), and the error case, which is nearly everything needed to call it correctly. Return value and permission prerequisites are the only notable omissions, and both are minor relative to the annotation coverage.

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 100%, so the baseline is 3, but the description adds real semantics the schema only hints at: it clarifies that the absolute pair defines 'the part of the layer's current window to keep' while the relative pair defines the amount to remove. That keep-versus-remove distinction is the main source of caller error and is explicitly disambiguated.

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 description opens with a specific verb and resource ('shorten a layer, committed immediately') and immediately enumerates the two supported modes, relative trim versus absolute range. An agent can tell this apart from delete_layer or update_layer without consulting any other tool.

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?

It clearly states the two mutually exclusive operating modes and the parameters that select each ('edge start|end + seconds' vs 'start_time + end_time'), plus the failure condition (NO_CHANGE). It does not name an alternative tool or say when to prefer update_layer or delete_layer instead, which keeps it below a 5.

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