Skip to main content
Glama

trim

Cut a clip from a media file using start time plus duration or end time. Re-encode for frame-accurate cuts by default, or copy streams for fast lossless cuts at keyframe boundaries.

Instructions

Cut a clip out of a media file. Give start (seconds) plus duration OR end. Re-encodes by default for frame-accurate cuts; set stream_copy=true for fast lossless cuts (keyframe boundaries only).

Input Schema

NameRequiredDescriptionDefault
endNoEnd time in seconds (alternative to duration)
inputYesPath to the file (relative or absolute)
startNoStart time in seconds
outputYesOutput file path
durationNoClip length in seconds
stream_copyNoCopy streams without re-encoding (fast, keyframe-accurate only)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does disclose the most important behavioral trait: re-encoding by default for frame accuracy versus fast lossless keyframe-boundary cuts with stream_copy. It omits overwrite semantics, whether output must not already exist, and the relative cost of re-encoding, so it is strong but not exhaustive.

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

Conciseness5/5

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

Two dense sentences, front-loaded with the core action and followed immediately by the parameter convention and the mode tradeoff. Every clause carries actionable information with no filler.

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 6-parameter mutation tool with no annotations and no output schema, the description covers the action, the parameter convention, and the accuracy/performance tradeoff. Remaining gaps such as overwrite behavior and error conditions when neither duration nor end is supplied are minor but real.

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%, which sets a baseline of 3, but the description adds real meaning the schema does not express: the mutual exclusivity of duration and end as alternative ways to define the clip end. That constraint is absent from the schema (no oneOf/enum), so the extra text earns a 4.

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

Purpose4/5

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

The description gives a specific verb and resource: "Cut a clip out of a media file," which is instantly distinguishable in practice from concat and extract_audio. It never explicitly names a sibling or scoping boundary, so it stops just short of the top mark.

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 calling convention (start + duration OR end) and gives explicit guidance on the key mode decision: default re-encode vs stream_copy for speed. It offers no guidance on when to prefer trim over siblings like concat or extract_frame, which keeps it from a 5.

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