Skip to main content
Glama

Trim a clip

trim

Cut a segment from a video or audio file by start time and end time or duration; stream copy by default, or enable re-encoding for frame-accurate cuts.

Instructions

Cut a segment from a video/audio file between a start time and either an end time or a duration. By default copies streams without re-encoding (fast, lossless); set reencode=true for frame-accurate cuts.

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": {
      "input": "<input>",
      "output": "<output>",
      "start": "<start>"
    },
    "name": "trim"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoEnd time (mutually exclusive with duration).
inputYesPath to the source media file.
startYesStart time. Seconds or timecode.
outputYesPath for the trimmed output file.
durationNoLength of the segment (mutually exclusive with end).
reencodeNoRe-encode for frame-accurate cuts instead of stream copy.
overwriteNoOverwrite the output file if it already exists.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/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: stream copy versus re-encoding and the accuracy/speed tradeoff that follows from it. It does not mention what happens if the output already exists or that the operation writes a new file, leaving those behaviors to the schema's `overwrite` parameter.

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 sentences, front-loaded with the core operation and followed by the default-versus-optional behavior. No filler and nothing redundant with structured fields.

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 7-parameter file-mutation tool with no annotations and no output schema, the description covers purpose and the encoding mode well. It could say more about overwrite semantics or what the tool returns, but the schema fills in the parameter-level details, so the gaps are minor.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter including the `end`/`duration` mutual exclusivity is already documented. The description adds only the contextual meaning of `reencode` (frame-accurate cuts), which is essentially a restatement of the schema's own wording, so the baseline of 3 applies.

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 segment from a video/audio file") plus the bounding conditions (start to end time or duration), which is enough to distinguish it from siblings like concat or extract_audio. It stops short of naming any sibling it overlaps with, so it lands at 4 rather than 5.

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 frames the two operational modes: default stream copy (fast, lossless) versus reencode=true (frame-accurate), which lets an agent pick the right configuration. It gives no guidance on when to choose this tool over convert or cut_silence, and no exclusions are stated.

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