Skip to main content
Glama

trim

Cut a video to a sub-clip using a start time plus end time or duration. Re-encodes by default for frame-exact cuts that fully remove unwanted content.

Instructions

Trim a video to a sub-clip by start + (end or duration). Re-encodes by default, so the cut is frame-exact and the removed content is really gone; set exact: false for a fast stream copy that keeps hidden frames from before start in the file.

Input Schema

NameRequiredDescriptionDefault
endNoEnd time in seconds. Use end OR duration.
exactNoRe-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.
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).

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. First observedv0.32.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: it discloses the default re-encoding behavior, frame-exact cuts, true content removal, and the hidden-frame risk of stream copying, including a warning against using exact:false for sensitive content. It stops short of mentioning permissions, overwrite behavior, or error conditions, which keeps it from 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.

Conciseness5/5

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

The description is a single tight sentence with the core operation front-loaded and the most consequential behavioral nuance immediately following. Every clause earns its place by adding either purpose or the critical exact-flag tradeoff.

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 seven-parameter mutation tool with no annotations and no output schema, the description covers the essential behavioral risk and the end-versus-duration relationship. It omits output-path defaults and overwrite semantics, but those are fully covered in the schema, so the description is largely complete.

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 the schema already explains all seven parameters thoroughly. The description adds only a small amount of semantic value: it frames the start/end/duration relationship and reinforces the exact flag's meaning. Baseline 3 is appropriate because the schema does the heavy lifting.

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 states a specific verb and resource: 'Trim a video to a sub-clip,' and clarifies the required start plus end-or-duration inputs. It is clear what the tool does, but it does not distinguish itself from the sibling 'clip' tool, leaving ambiguity about when to prefer one over the other.

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 gives explicit guidance on the key exact flag tradeoff: default re-encode for frame-exact removal versus exact:false for fast stream copy with hidden frames. However, it offers no guidance on when to use this tool versus siblings like clip or cut_idle, so routing between similar tools remains unclear.

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