Skip to main content
Glama

Compress Video

compress
Destructive

Re-encode a video to reduce its file size using H.264 CRF levels and an optional width cap; for platform-specific targets, use export presets.

Instructions

Re-encode a video smaller (H.264 CRF ladder, optional width cap). For a platform target use export_preset.

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": "<input>"
    },
    "name": "compress"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesPath to the source video.
levelNoCRF 23 / 28 / 32 (default medium).
outputNoOptional output path. Defaults under SCREENCAST_HOME/edits.
maxWidthNoWidth cap in px (only downscales).
overwriteNoAllow replacing an existing file at the output path (default false).

Output Schema

NameRequiredDescriptionDefault
outputPathYesPath of the file written.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.47.0
    • changedInput schema / properties / level / description
      Previous value: -"How hard to compress (CRF 23 / 28 / 32). Default medium."New value: +"CRF 23 / 28 / 32 (default medium)."
    • changedInput schema / properties / maxWidth / description
      Previous value: -"Optional width cap in px; only ever downscales. Height follows aspect."New value: +"Width cap in px (only downscales)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "outputPath": {
      +      "description": "Path of the file written.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "outputPath"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.32.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already disclose destructiveHint=true and idempotentHint=false, so the safety profile is covered. The description adds the CRF ladder mechanism, useful context beyond annotations, but doesn't say what gets overwritten, that output defaults under SCREENCAST_HOME/edits, or that overwrite=false by default — all relevant for a destructive, non-idempotent 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?

Two short sentences, zero waste, with the mechanism stated first and the routing hint second. Nothing redundant against the schema.

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?

With an output schema and full annotations, the description doesn't need to explain return values or safety. It's sufficient to call correctly, though it leaves the overwrite/destructive semantics implied rather than stated.

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 coverage is 100%, so every parameter is already documented, including CRF values per level and the downscale-only behavior of maxWidth. The description merely echoes 'CRF ladder' and 'width cap' without adding syntax or defaults beyond the schema — baseline 3 applies.

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?

States a specific verb and resource ('Re-encode a video smaller') and immediately qualifies the mechanism (H.264 CRF ladder, optional width cap), which distinguishes it from encode-adjacent siblings like convert and export_preset. An agent can tell exactly what this tool produces.

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?

Explicitly routes the agent: 'For a platform target use export_preset' names the alternative and the condition selecting it. It doesn't address other plausible rivals (scale, convert) or note when not to compress, so it's clear but not exhaustive.

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