Skip to main content
Glama

trim_video

Cut a video clip to an exact duration or start/end times. Useful for fitting b-roll to a voiceover segment length. Returns verified actual duration.

Instructions

Frame-accurately cut a clip to an exact span (re-encode, not -c copy).

Provide EITHER duration_s (keep [0, duration_s]) OR start_s+end_s. Use this to cut a generated b-roll clip down to a voiceover segment's length. Resolution/fps/aspect are preserved; a silent clip stays silent. Returns the ffprobe-verified actual duration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_sNo
start_sNo
duration_sNo
video_pathYes
output_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses several behavioral traits: re-encoding (not stream copy), preservation of resolution/fps/aspect, silence preservation, and ffprobe-verified duration return. It also frames the operation as frame-accurate. This is a solid disclosure of what the tool does, though it stops short of mentioning error conditions or what happens if both modes are provided.

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 four concise sentences, front-loaded with the core purpose. The remaining sentences provide essential usage and behavioral details without redundancy. Every line earns its place, and the structure is easy to scan.

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?

The description adequately covers the main usage scenarios and behavioral details for a trim operation with five parameters. Since an output schema exists, the return value is already documented, and the description adds the ffprobe-verified duration note. It could be more complete by addressing mutually exclusive parameter validation, but overall it is well-rounded and sufficient for the tool's complexity.

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 description coverage is 0%, so the description must compensate. It explains the core parameter semantics: 'duration_s (keep [0, duration_s])' and 'start_s+end_s' for specifying the exact span. It also clearly implies the roles of video_path and output_path through the operation context. This is sufficient for an agent to understand how to fill these parameters, despite not detailing every edge case.

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 'Frame-accurately cut a clip to an exact span', which is a specific verb and resource. The additional 're-encode, not -c copy' and emphasis on exact span distinguish it from sibling tools like retime_video, extract_frame, and stitch_videos. This is a clear, differentiated purpose.

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?

The description provides a concrete use case: 'Use this to cut a generated b-roll clip down to a voiceover segment's length.' It also clearly states the parameter selection constraint (EITHER duration_s OR start_s+end_s). However, it does not explicitly mention when not to use this tool or suggest alternatives, so it falls short of a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AvivK5498/VideoGenerationMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server