Skip to main content
Glama

Trim Video

trim
Destructive

Cut a video down to one sub-clip using a start time plus an end time or duration, so you can isolate a specific segment for review or export.

Instructions

Cut a video down to one sub-clip by start + (end or duration). For several segments use clip; to combine with other edits use pipeline.

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

Input Schema

NameRequiredDescriptionDefault
endNoEnd time in seconds. Use end OR duration.
exactNoRe-encode for a frame-exact cut with the removed content really gone (default true). false = fast stream copy that snaps to a keyframe and keeps hidden earlier frames; never use it to remove secrets.
inputYesPath to the source video.
startYesStart time in seconds.
outputNoOptional output path. Defaults under SCREENCAST_HOME/edits.
durationNoClip length in seconds. Use end OR duration.
overwriteNoAllow replacing an existing file at the output path (default false).

Output Schema

NameRequiredDescriptionDefault
outputPathYesPath of the file written.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.47.0
    • changedInput schema / properties / exact / description
      Previous value: -"Re-encode so the cut is frame-exact and nothing before start stays in the file (default true). false stream-copies: much faster, but the cut snaps to a keyframe and the frames before start still ship in the file, hidden only by an edit list. Never use false to remove sensitive content."New value: +"Re-encode for a frame-exact cut with the removed content really gone (default true). false = fast stream copy that snaps to a keyframe and keeps hidden earlier frames; never use it to remove secrets."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "outputPath": {
      +      "description": "Path of the file written.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "outputPath"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changedv0.39.0
    • addedInput schema / properties / exact
      Added value: +{
      +  "description": "Re-encode so the cut is frame-exact and nothing before start stays in the file (default true). false stream-copies: much faster, but the cut snaps to a keyframe and the frames before start still ship in the file, hidden only by an edit list. Never use false to remove sensitive content.",
      +  "type": "boolean"
      +}
  3. First observedv0.32.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, non-idempotent, non-read-only, so the safety profile is covered. The description adds nothing about overwrite behavior, default output location, or the keyframe/stream-copy caveat — that substance lives in the schema's 'exact' and 'overwrite' descriptions. Useful routing but limited added behavioral context beyond structured fields.

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?

Two short sentences with zero filler, and the core operation is front-loaded ahead of the alternatives. Slightly terse for a destructive 7-param tool, but nothing is wasted.

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?

Output schema exists, annotations cover the safety profile, and all 7 params are documented in the schema, so the description needn't explain return values. What remains missing — that it writes a file which can overwrite an existing one by default — is handled by the 'overwrite' param description, so the definition is essentially complete for correct invocation.

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%, including the end-vs-duration exclusivity and the frame-exact / keyframe tradeoff. The description only restates the 'end or duration' rule already in the schema, adding no syntax, units, or format detail beyond it. Baseline 3 for a fully documented schema.

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 (cut down to one sub-clip) and the exact mechanism (start + end or duration), which is more precise than the title 'Trim Video'. It also explicitly names the siblings it is not (clip, pipeline), so an agent can separate it from them without opening any 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 routing: single segment goes here, multiple segments go to clip, combining with other edits goes to pipeline. That is a named alternative plus the condition that selects it, which is the top of the scale.

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