Skip to main content
Glama

compress_video

Shrink video files to meet upload size limits using target file sizes, presets, or CRF quality levels without altering the original.

Instructions

Compress video files to fit upload limits (such as GitHub PRs under 10MB or Discord under 25MB) using target file sizes or CRF quality levels. Does not modify the original file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
crfNoQuality value between 18 (higher quality) and 45 (smaller file). Overrides preset.
presetNoPreset when targetSizeMB is not set: 'github_pr', 'discord', 'email', 'balanced', or 'high_quality'. Default: 'balanced'.balanced
maxWidthNoMaximum video width in pixels, such as 1280 for 720p. Keeps aspect ratio.
inputPathYesPath to the source video file (e.g. './recordings/demo.mov')
outputPathYesDestination path for the compressed MP4 file (e.g. './recordings/demo_compressed.mp4')
targetSizeMBNoTarget output size in megabytes, such as 9.5 for GitHub or 24 for Discord. Computes bitrates from duration.
hardwareAccelerationNoUse hardware-accelerated video encoding (VideoToolbox, NVENC, QSV, etc.) when available. Default: true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.0
    • changedInput schema / properties / hardwareAcceleration / description
      Previous value: -"Use Apple Silicon VideoToolbox encoding when available. Default: true."New value: +"Use hardware-accelerated video encoding (VideoToolbox, NVENC, QSV, etc.) when available. Default: true."
  2. Changed7 schema fields changedv0.4.2
    • changedInput schema / properties / crf / description
      Previous value: -"Custom Constant Rate Factor (18=near lossless, 23=default, 28=small, 35=very small)"New value: +"Quality value between 18 (higher quality) and 45 (smaller file). Overrides preset."
    • changedInput schema / properties / hardwareAcceleration / description
      Previous value: -"Whether to use Apple Silicon VideoToolbox acceleration if available (default: true)"New value: +"Use Apple Silicon VideoToolbox encoding when available. Default: true."
    • changedInput schema / properties / inputPath / description
      Previous value: -"Path to the source video file"New value: +"Path to the source video file (e.g. './recordings/demo.mov')"
    • changedInput schema / properties / maxWidth / description
      Previous value: -"Optional maximum width to downscale (e.g. 1280 for 720p)"New value: +"Maximum video width in pixels, such as 1280 for 720p. Keeps aspect ratio."
    • changedInput schema / properties / outputPath / description
      Previous value: -"Target path for compressed output file"New value: +"Destination path for the compressed MP4 file (e.g. './recordings/demo_compressed.mp4')"
    • changedInput schema / properties / preset / description
      Previous value: -"Compression preset if targetSizeMB is not specified"New value: +"Preset when targetSizeMB is not set: 'github_pr', 'discord', 'email', 'balanced', or 'high_quality'. Default: 'balanced'."
    • changedInput schema / properties / targetSizeMB / description
      Previous value: -"Optional target file size in Megabytes (e.g., 10 for GitHub PRs, 25 for Discord)"New value: +"Target output size in megabytes, such as 9.5 for GitHub or 24 for Discord. Computes bitrates from duration."
  3. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / hardwareAcceleration
      Added value: +{
      +  "description": "Whether to use Apple Silicon VideoToolbox acceleration if available (default: true)",
      +  "type": "boolean"
      +}
  4. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the key safety trait: 'Does not modify the original file,' implying a new output file is written. It omits other relevant behavior such as processing cost/time, requirements on the source file, and how the preset/CRF/targetSizeMB inputs interact or which wins.

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 tightly written sentences with the purpose and the non-destructive guarantee front-loaded; no filler and every clause carries information.

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 tool with complete schema descriptions and no output schema, the description covers the what, the why, and the safety guarantee. The only real gap is the precedence/interaction between preset, crf, and targetSizeMB, which the schema only partially signals via 'Overrides preset.'

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 coverage is 100%, so 3 is the baseline. The description goes slightly beyond by tying the compression goals to real size budgets (GitHub <10MB, Discord <25MB), which gives the agent intuition for choosing targetSizeMB or a preset over a raw CRF value.

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 specific verb and resource ('Compress video files') plus a concrete goal (fit upload limits) and the two mechanisms available (target file sizes, CRF quality levels). It does not, however, position itself against close siblings like media_convert or reformat_aspect_ratio, which an agent must choose between.

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?

Gives clear situational context — compressing for GitHub PRs under 10MB or Discord under 25MB — which implies when to reach for it. It stops short of naming alternatives or stating exclusions (e.g., 'for plain format conversion use media_convert instead').

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