MultiMediaGrep
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MMGREP_ASR_MODEL | No | ASR model name. The default is provider-independent — with `openai-compatible` you must explicitly change it to something like `whisper-1`, otherwise `scribe_v1` is sent to the OpenAI-compatible service. | scribe_v1 |
| MMGREP_CACHE_DIR | No | Cache root directory (frames, page images, transcripts, full-text dumps all live here). `~` is expanded; relative paths resolve against cwd. | ~/.cache/multimediagrep |
| MMGREP_DOC_MODEL | No | Parsing model name; empty = service default (MinerU accepts `pipeline` / `vlm` / `MinerU-HTML`). | |
| MMGREP_LOG_LEVEL | No | Log level: `error` / `warn` / `info` / `debug`. Logs always go to stderr (stdout is the protocol channel). | info |
| MMGREP_ASR_API_KEY | No | ASR API key. Required once a provider is selected — even self-hosted local services need a non-empty value (anything works, e.g. `local`). | |
| MMGREP_DOC_API_KEY | No | Document parsing service token (MinerU: https://mineru.net/apiManage/token). | |
| MMGREP_FFMPEG_PATH | No | Absolute path to the ffmpeg executable when it is outside `PATH`; defaults to lookup via `PATH`. | |
| MMGREP_ASR_BASE_URL | No | ASR API base URL. The default is provider-independent — with `openai-compatible` you must explicitly change it to your service address. | https://api.elevenlabs.io/v1 |
| MMGREP_ASR_LANGUAGE | No | Force language (BCP-47, e.g. `zh` / `en`); `auto` = let the service decide. | auto |
| MMGREP_ASR_PROVIDER | No | ASR backend: `none` (no transcription) / `elevenlabs` / `openai-compatible`. | none |
| MMGREP_DOC_BASE_URL | No | Document parsing API base URL. | https://mineru.net/api/v4 |
| MMGREP_DOC_PROVIDER | No | Document parsing backend: `none` (page images only) / `mineru`. | none |
| MMGREP_FFPROBE_PATH | No | Absolute path to the ffprobe executable when it is outside `PATH`; defaults to lookup via `PATH`. | |
| MMGREP_OCR_PROVIDER | No | Reserved for an independent local OCR channel. Not implemented in the current version: OCR is handled by the document parsing provider (MinerU); this variable only appears in the startup banner and does not affect any tool behavior. | none |
| MMGREP_ASR_TIMEOUT_MS | No | ASR single-request timeout. | 120000 |
| MMGREP_DOC_TIMEOUT_MS | No | Document parsing single-request timeout (3 minutes). MinerU is upload -> queue -> parse -> download wall-clock time, so increase it if queuing is slow. | 180000 |
| MMGREP_MAX_IMAGE_EDGE | No | Global upper limit on the longest edge of a single image (px). Requests exceeding it return `BUDGET_EXCEEDED`. | 1600 |
| MMGREP_CACHE_MAX_BYTES | No | Cache size limit, supports `512MB` / `10GB` / raw byte counts; exceeding it evicts by LRU. | 10737418240 |
| MMGREP_MAX_CONCURRENCY | No | Maximum concurrency. | 2 |
| MMGREP_MAX_IMAGE_TOKENS | No | Soft image-token budget per call. When exceeded, auto mode downshapes; explicit mode only warns. | 4000 |
| MMGREP_MAX_TEXT_INLINE_CHARS | No | Maximum number of text characters returned inline. | 24000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| media_probeA | Inspect a local media file — video, audio recording, or document — and report what it is: duration, resolution, page count, codec, available tracks (audio / subtitle / text layer), and whether transcription (ASR) and OCR are available for this file. (读取本地媒体的元信息:时长、分辨率、页数、编码、可用轨道(音轨 / 字幕轨 / 文本层), 以及能否做 ASR / OCR 的初判。) Call this FIRST on any file you have not inspected yet. It costs no image tokens and decodes nothing. Then pick the right next tool:
For audio it also reports a quick health check — average level, speech ratio and silence ratio — so you know whether the recording actually contains audible speech before you spend an ASR call on it. A recording that is effectively silent is reported as such and is never sent to ASR (no hallucinated transcript). This server never downloads anything and never calls an LLM: you always pass a local absolute path, and it only prepares images and text for your own model to look at. |
| media_overviewA | Build an overview of a local media file so you can read it without guessing. (生成媒体总览:视频出分镜宫格图与按时间对齐的文本清单;录音出带时间轴的转写;文档出页面缩略图与每页文字。) What you get depends on the media:
TEXT SOURCE ORDER — subtitles first, ASR only as a fallback:
The storyboard grid is for FINDING things, not for reading them: cells are small, so text inside a cell is usually unreadable. To read text on screen, call media_zoom on that moment and read the cropped single frame. The full text is NOT inlined. It is written to disk and the returned paths point at it: content.md (readable), segments.jsonl (one segment per line, machine-readable), manifest.json (what was produced and how). Read those files section by section and summarise them in chunks yourself — do not ask for the same range again just to get more inline text. Always call media_probe first: it tells you how long the file is, whether a subtitle source exists, and which transcript source applies, for free. Long media must be narrowed with start/end (video, audio) or pages (document) — one giant grid of a two-hour film gives you illegible cells and spoils the ending. Follow the continuation hint in the result to page through the rest. |
| media_zoomA | Get a close-up of one moment in a local video, or one page of a local document, returned as a single image. (取本地视频某一时刻的特写单帧,或本地文档某一页的整页 / 局部放大图。) Use it after media_overview when one cell or page needs a closer look: "what exactly is on screen at 01:12?" "what does line 3 of page 7 say?" For video, pass at (a single timestamp) or start/end (a window — the sharpest frame inside it is returned, and the exact timestamp is reported back). For a document, pass page, optionally with crop. crop is {x, y, width, height}, each a fraction 0..1 of the frame or page, origin top-left. Keep it to one frame. It costs roughly 1,900 vision tokens — far more than a whole overview cell. Zoom the parts that matter instead of re-scanning the file. This is the ONLY tool whose image is meant for reading. A storyboard cell is a few hundred pixels wide and the text inside it is unreadable; a cropped single frame at up to 1600 px is readable. So: locate in the overview grid, then zoom to read. The returned image is always source "visual" — what you read off it is your own reading of pixels, not a transcript, so treat it as an observation rather than a quotation. |
| media_locateA | Find where something appears in a local media file and return its position: a timestamp (milliseconds and seconds) for a video or recording, a page number for a document. (定位:给一段文本或关键词,返回它在视频 / 录音里的时间戳,在文档里的页码。) Use it when you know roughly what was said but not when ("where does it mention X"), or when you need to know which page a phrase is on. Matching ignores punctuation, spacing and case, and works for both Chinese and English. Long phrases match better than single characters. Text only by default — no image, no pixels spent. Add includeFrame: true to also get the picture at the best match (one image, roughly 1,900 vision tokens). A transcript is required: the embedded subtitle track, a transcriptFile you pass in, or ASR configured via MMGREP_ASR_PROVIDER. Subtitles win over ASR. If none is available this tool says so instead of guessing. Use media_overview if you only need the visuals. Each match is tagged with its source. A match whose source is "asr" came from machine transcription, so the wording may be wrong (names, numbers, jargon) — do not present it as the speaker's exact words. |
| video_subtitlesA | Read subtitles for a local media file and return them as timestamped segments. (读取本地字幕文件或视频内嵌字幕轨,解析成带时间轴的段落列表。) Two sources, in this order: an explicit transcriptFile (a local .srt, .vtt, .ass or .ssa file), or the subtitle track embedded in the container. Auto-discovery also picks up a sibling file with the same base name in the same directory (a.srt next to a.mp4) when neither of the above is available — the source and the exact path are always reported back, never silently. No image and no pixels spent: the result is text with millisecond and second timestamps. Use media_locate to search inside the subtitles. Use media_overview if you also want to see what is on screen. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 5 tools
Each tool has a documented role: media_probe inspects metadata, media_overview builds the grid/transcript, media_zoom reads one frame, media_locate searches text for a timestamp/page, and video_subtitles dumps subtitle segments. The overlap is mild but real: video_subtitles and media_overview both return timestamped text, and the descriptions spend considerable effort telling the agent which one to prefer. That overlap is resolvable from the docs, so boundaries are mostly clear.
Four of five tools use a clean media_<verb> pattern (media_probe, media_overview, media_zoom, media_locate). video_subtitles breaks the prefix and is also slightly misleading since it works on any media container, not just video. Otherwise consistent snake_case with predictable verbs.
Five tools map cleanly onto a probe -> overview -> zoom/search/transcript inspection pipeline, and each earns its place against a distinct cost model (free metadata, cheap grids, expensive single frames). Nothing is redundant or missing at the count level; it is well within the 3-15 sweet spot.
The lifecycle is covered: inspect, overview, drill down, search, and read subtitles, with ASR/OCR availability surfaced by media_probe and consumed by the other tools. Minor gaps remain: there is no explicit OCR/document-text tool despite OCR being reported, and no way to discover or list local media files, so the agent must already know absolute paths. These are workable around but not fully closed.