media-context (mctx)

v0.1.2
io.github.mollymogi/media-context Checked 4 days ago Published 17 days ago

Keep images, video & audio out of coding agent contexts — local FFmpeg + zero extra API cost.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

media_probe

Zero-token local media probe via ffprobe/ffmpeg. Returns compact JSON with duration, resolution, fps, codecs, and optional audio volume/silence or video black-frame checks.

ParameterTypeDescription
path *stringAbsolute path to image, audio, or video file.
check_audiobooleanRun volumedetect & silencedetect.
check_blackbooleanRun blackdetect on video.

media_sheet

Compress a video or multiple image frames into a single low-resolution timestamped contact sheet JPEG to save 85%+ visual tokens.

ParameterTypeDescription
inputs *array1 video file path, or a list of image file paths / directories.
gridstringGrid layout like '3x3' or '4x3'. Default '3x3'.
timestampsbooleanOverlay timestamps on video tiles. Default true.
widthintegerTotal sheet width in pixels. Default 1280.

media_shrink

Downscale and compress a single large image into a lightweight JPEG copy.

ParameterTypeDescription
path *stringPath to image file.
max_sideintegerMax width/height in pixels. Default 1024.
qualityintegerJPEG quality 1-100. Default 78.

media_inspect

Inspect images/videos/audio in an isolated, stateless subscription CLI worker (zero extra API cost, zero media tokens leaked into the main conversation). Automatically creates contact sheets for videos/multi-images and caches results in SQLite.

ParameterTypeDescription
inputs *arrayList of media file paths or directories to inspect.
question *stringConcise inspection question or checklist.
backendstringOptional backend CLI: auto, agy, claude, codex, opencode.
gridstringContact sheet grid for videos/multi-images. Default '3x3'.
modelstringOptional model override for the worker CLI.
no_cachebooleanBypass SQLite cache.

media_transcribe

Zero-cost local offline audio/video transcription using installed whisper engine.

ParameterTypeDescription
path *stringPath to audio or video file.
languagestringOptional language code (e.g. 'zh', 'en').

media_stats

Return cumulative bytes and estimated tokens saved by media-context.