Skip to main content
Glama

video_trim

Destructive

Cut a segment from a video by start time and duration or end, and return JSON with success and output_path for the rendered clip.

Instructions

Cut a segment out of a video by start time and duration or end. Returns JSON {success, output_path} pointing at the rendered clip.

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_path": "<input_path>"
    },
    "name": "video_trim"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoEnd timestamp. Exclusive with duration.
startNoStart timestamp (e.g. '00:02:15') or numeric seconds (e.g. 10.5).0
reviewNoAlso write a review card for the result (default). Reply with the returned preview_directive alone on its own line so Hermes Desktop shows it.
accurateNoIgnored: trims re-encode, so they are always frame-accurate.
durationNoDuration to keep (e.g. '00:00:30' or '30'). Exclusive with end.
overwriteNoAllow replacing existing media files.
input_pathYesAbsolute path to the input video.
output_pathNoWhere to save the trimmed video. Auto-generated if omitted.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.0.1
    • addedInput schema / properties / review
      Added value: +{
      +  "default": true,
      +  "description": "Also write a review card for the result (default). Reply with the returned preview_directive alone on its own line so Hermes Desktop shows it.",
      +  "type": "boolean"
      +}
  2. Changed16 schema fields changedv2.0.0
    • addedInput schema / properties / accurate / description
      Added value: +"Ignored: trims re-encode, so they are always frame-accurate."
    • removedInput schema / properties / accurate / title
      Removed value: -"Accurate"
    • addedInput schema / properties / duration / description
      Added value: +"Duration to keep (e.g. '00:00:30' or '30'). Exclusive with end."
    • removedInput schema / properties / duration / title
      Removed value: -"Duration"
    • addedInput schema / properties / end / description
      Added value: +"End timestamp. Exclusive with duration."
    • removedInput schema / properties / end / title
      Removed value: -"End"
    • addedInput schema / properties / input_path / description
      Added value: +"Absolute path to the input video."
    • removedInput schema / properties / input_path / title
      Removed value: -"Input Path"
    • addedInput schema / properties / output_path / description
      Added value: +"Where to save the trimmed video. Auto-generated if omitted."
    • removedInput schema / properties / output_path / title
      Removed value: -"Output Path"
    • changedInput schema / properties / overwrite / description
      Previous value: -"Explicitly allow replacing existing media. Existing non-media files are protected."New value: +"Allow replacing existing media files."
    • removedInput schema / properties / overwrite / title
      Removed value: -"Overwrite"
    • addedInput schema / properties / start / description
      Added value: +"Start timestamp (e.g. '00:02:15') or numeric seconds (e.g. 10.5)."
    • removedInput schema / properties / start / title
      Removed value: -"Start"
    • removedInput schema / title
      Removed value: -"video_trimArguments"
    • removedOutput schema / title
      Removed value: -"video_trimDictOutput"
  3. Changed1 schema field changedv1.16.4
    • addedInput schema / properties / overwrite
      Added value: +{
      +  "default": false,
      +  "description": "Explicitly allow replacing existing media. Existing non-media files are protected.",
      +  "title": "Overwrite",
      +  "type": "boolean"
      +}
  4. Changed5 schema fields changedv1.16.0
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / duration / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / end / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / start / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  }
      +]
    • removedInput schema / properties / start / type
      Removed value: -"string"
  5. Changed1 schema field changedv1.5.1
    • addedInput schema / properties / accurate
      Added value: +{
      +  "default": false,
      +  "title": "Accurate",
      +  "type": "boolean"
      +}
  6. First observedv0.2.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and non-idempotent, so the safety profile is known; the description adds the return shape (success, output_path) and that the result is a rendered clip. It does not explain whether the source file is ever modified, that output requires the overwrite flag to replace existing files, or any re-encoding cost, which are the remaining behavioral unknowns.

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 tight sentences, front-loaded with the operation, with no filler. The trailing return-shape sentence is mildly redundant given an output schema exists, keeping it just under top marks.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present the return values need not be explained, and parameter documentation is complete in the schema. However, for a destructive, non-idempotent media-writing tool the description says nothing about source-file safety or overwrite behavior, leaving a notable gap for 8 parameters.

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 start/duration/end exclusivity and the overwrite and accurate flags is already documented in structured data. The description only restates the timing exclusivity, adding no syntax or edge-case meaning beyond the schema.

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?

States a concrete verb and resource ('Cut a segment out of a video') plus the two timing modes (start+duration or start+end), which is enough to separate it from merge, extract_frame, and effects tools. It stops short of explicitly naming a sibling or contrasting with adjacent operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not-to-use guidance appears; the only condition given ('duration ... Exclusive with end') is a parameter constraint, not usage routing. An agent must infer from sibling names alone which tool handles trimming versus merging or short generation.

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