Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
FFMPEG_PATHNoPath to the ffmpeg executable. If not set, ffmpeg must be available on PATH.
FFPROBE_PATHNoPath to the ffprobe executable. If not set, ffprobe must be available on PATH.
MEDIAKIT_ALLOWED_DIRSNoAllow-list of directories that input and output paths must resolve inside. Separate multiple directories with ';' on Windows or ':' elsewhere.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Everyday audio/video jobs powered by ffmpeg. Start with media_info to see what a file is. Then pick the tool for the intent: compress (to a size like 10 MB or a preset such as discord-10mb / whatsapp), convert (mp4, webm, mkv, mp3, wav, gif...), trim, extract_audio, make_gif, extract_frames (thumbnails), concat (join same-format clips) and transform (resize, crop, speed). Every tool accepts dry_run=true and then returns the exact ffmpeg command line without running it. Outputs are written next to the input (clip.compressed.mp4) and existing files are never overwritten unless overwrite=true. Paths may be absolute or relative to the server's working directory.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
media_infoA

Summarize a media file with ffprobe: container, duration, size, bitrate, and every stream (codec, resolution, fps, sample rate, channels). Use it first to learn what you have before compressing or converting, and to check results afterwards.

input: path to an audio/video/image file.

convertA

Convert a file to another format with sensible codecs.

Video: mp4/mov/mkv (H.264 + AAC), webm (VP9 + Opus). Audio: mp3, wav, flac, ogg, m4a, opus, aac. gif: the first 5 seconds (use make_gif for control). Choose the target with format (e.g. "webm") or by the extension of output; the default output sits next to the input.

quality: low | medium | high (trades size for fidelity). For a size limit use compress. overwrite: replace an existing output (default: refuse). dry_run: return the ffmpeg command instead of running it. timeout_s: stop ffmpeg after this many seconds.

compressA

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.

trimA

Cut a section out of a video or audio file.

start, end, duration: seconds (12.5) or [HH:]MM:SS[.ms] ("1:02:03.5"). Give start and end, or start and duration; with only start the cut runs to the end of the file. mode: "accurate" (default) re-encodes so the cut is frame-exact; "fast" copies the streams without re-encoding (instant, lossless) but the cut snaps to the keyframe before start, so the clip may begin a little early. Default output: name.trimmed.ext.

extract_audioB

Pull the audio track out of a video (or re-encode an audio file).

format: mp3 (default), wav, flac, ogg, m4a, opus, aac, or "copy" to keep the original audio stream untouched (fast, lossless; picks the matching extension). bitrate: for lossy formats, e.g. "192k" (overrides quality). Fails clearly if the input has no audio. Default output: name.audio.mp3 next to the input.

make_gifA

Make a high-quality animated GIF from a video (two-step palette: palettegen + paletteuse).

start: where to begin (default 0). duration: seconds to capture (default 5, max 30; it is shortened if the clip ends sooner). fps 1-30 (default 12). width in pixels (default 480, height keeps the aspect ratio; never upscaled). loop: repeat forever (default true). GIFs grow fast: for long clips use convert to mp4/webm instead.

extract_framesA

Save still images (thumbnails) from a video.

Either times (a list like [1, 12.5, "0:01:30"]: one image per time) or every_s (one image every N seconds, starting at 0). With neither, one frame from the middle. format: png (default) or jpg. width: resize to this width (aspect kept). max_frames guards against producing thousands of files. Images go to output_dir (default: a "name.frames" folder next to the input) as name.frame-12.5s.png or name.frame-0001.png.

concatA

Join clips end to end without re-encoding (fast and lossless).

The clips must share codec, resolution, pixel format, frame rate and audio parameters (for example several recordings from one camera or pieces made by trim). If they differ, the error says exactly which property differs; convert/transform them to match first. Default output: first.concat.ext next to the first input.

transformA

Resize, crop and/or change the speed of a video (re-encodes with H.264/AAC, or VP9 for .webm).

width / height: target size in pixels; give one and the other keeps the aspect ratio. crop: "W:H" (centered) or "W:H:X:Y" in pixels, applied before resizing. speed: 0.25-4 (2 = twice as fast, 0.5 = slow motion); audio is retimed to match. Default output: name.transformed.ext.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 9 tools

Disambiguation4/5

Each tool targets a distinct operation (info, convert, compress, trim, gif, frames, concat, transform), and descriptions steer between them (e.g. 'for a size limit use compress', 'use make_gif for control'). However, overlap remains: compress with only a quality setting is essentially a quality-based re-encode that duplicates convert's quality path, and extract_audio's 're-encode an audio file' overlaps with convert for audio targets.

Naming Consistency4/5

Mostly verb-based snake_case (convert, compress, trim, extract_audio, extract_frames, make_gif, transform), with two terse exceptions: the noun-style media_info and the bare verb concat. Predictable and readable overall, but not a strict uniform pattern.

Tool Count5/5

Nine tools is a well-scoped surface for an ffmpeg wrapper: one tool per common media operation, with no filler or trivially thin coverage. Each tool has a clear reason to exist.

Completeness4/5

Covers the core lifecycle well: inspect (media_info), convert, resize/crop/speed (transform), shrink (compress), cut (trim), extract (audio, frames), compose (concat, make_gif). Gaps exist around muxing/replacing audio tracks, subtitle handling, and watermark/normalize operations, but agents can work around most of these with the given tools.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues