Skip to main content
Glama

compress

Shrink a video to a target file size, platform preset, or quality level; cap resolution and optionally preview ffmpeg commands before running.

Instructions

Make a video smaller. Three ways to say how:

  • target_mb: aim for a file size in MB (MiB). Uses a two-pass encode with bitrate maths (video bitrate = target size / duration - audio, with a 5% safety margin) and lowers the resolution automatically when the bitrate would be too low to look decent. The result reports whether the target was met; errors if the target is impossibly small.

  • preset: discord-10mb, discord-50mb, whatsapp (16 MB, 720p max), email-25mb (aims at 18 MB because attachments grow ~37% when mailed), or web (quality-based, 1080p max).

  • neither: a quality-based (CRF) re-encode controlled by quality low|medium|high.

max_height: never exceed this height in pixels. output ending in .webm uses VP9/Opus, otherwise H.264/AAC (default output: name.compressed.mp4 next to the input). overwrite: replace an existing output. dry_run: return the ffmpeg commands (both passes) without running them. timeout_s: stop after this many seconds.

Input Schema

NameRequiredDescriptionDefault
inputYes
outputNo
presetNo
dry_runNo
qualityNomedium
overwriteNo
target_mbNo
timeout_sNo
max_heightNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/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 burden and does substantial work: two-pass encoding, bitrate math with a 5% margin, automatic resolution lowering, reporting whether the target was met, erroring on impossible targets, codec selection driven by output extension, and the default output filename. Remaining gaps are behavioral edge cases such as what happens when the output path already exists and overwrite=false, and whether audio/subtitle streams are preserved beyond the bitrate subtraction. That is strong but not exhaustive disclosure for a 9-parameter mutation tool.

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?

Front-loaded with the outcome, then organized as a bullet per mode, followed by a compact pass over the remaining parameters. The bitrate-maths parenthetical is dense but it explains why resolution gets lowered, so it earns its place. No filler sentences.

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?

Nine parameters, no annotations, and an output schema that already covers return values — given that, the description supplies nearly everything needed to call the tool correctly. The one real hole is conflict resolution: it never says what happens if both target_mb and preset are provided, or whether quality is ignored when a preset is used (only implied by "neither").

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the schema declares no enums, so the description must supply all parameter meaning — and it does, covering target_mb, preset (with all five valid values and their caps), quality (low|medium|high), max_height, output (extension-to-codec mapping plus default), overwrite, dry_run, and timeout_s. Only the trivially obvious input is left undocumented. This fully compensates for the empty schema descriptions.

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?

"Make a video smaller" is a concrete verb+resource that an agent can distinguish from convert, trim, or extract_audio without opening the schema. The three named strategies (target_mb, preset, quality) further pin down what kind of operation this is. It stops short of explicitly contrasting itself with any sibling, which keeps it from a 5.

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 lays out three mutually exclusive selection modes and what each is for, including the case of supplying neither (CRF re-encode via quality), which is exactly the decision an agent must make. It adds useful failure context ("errors if the target is impossibly small"). It gives no guidance on when to prefer a sibling tool such as convert instead, so 4 rather than 5.

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