Probe media
media_probeInspect a local video, audio file, or document to report duration, resolution, codec, tracks, pages, transcription/OCR availability, outlines, and annotations before choosing the next tool.
Instructions
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:
video / audio -> media_overview to read it
document -> media_overview to see page thumbnails and per-page text
a specific moment or page -> media_zoom for a close-up
"where was X said / on which page" -> media_locate for a timestamp or a page number
For documents it also checks whether the text layer looks unreliable — U+FFFD replacement characters, private-use characters, isolated single letters, symbol noise — and, when it does, points at media_overview({ path, ocr: "force" }) to re-recognize the pages. (文档文字层看起来不可靠时会提示,可用 ocr: "force" 强制重新识别)
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).
It also shows ONE outline for the file, from the first available source: the bookmark sidecar (".mmgrep.bookmark.json", written by media_bookmark) when one exists, otherwise the file's own outline — PDF bookmarks (PHYSICAL page numbers, the same 1-based numbers media_overview accepts) or chapter markers in video/audio (title + start/end timestamps). Every line carries a bookmark id ("b3 p.12 title" for PDFs, "b3 00:12:34 title" for video/audio) — these are the ids media_bookmark accepts. When a sidecar exists, the last outline line is "full detail: ": read that file for the complete outline. The text shows at most 2 levels / 60 entries; structuredContent.outline has every entry, the source and the sidecar path. Read-only: probing never creates or modifies a sidecar. (读取侧只展示一份目录:sidecar 优先,其次文件自带目录;行首 b1…bN 就是 media_bookmark 的 id)
It also reports the ANNOTATIONS of the file: how many there are and where they live — the annotation sidecar (".mmgrep.annotation.json", written by media_annotate) when one exists, otherwise the file's own annotations (PDF annotation objects). Probe reports the COUNT and the sidecar path only; the notes themselves are shown by media_overview, next to the page / time range they belong to ("n3 (p.12): note" for PDFs, "n3 (00:12:34–00:12:39): note" for video/audio). media_locate can also search the annotation text. Read-only: probing never creates or modifies a sidecar. (读取侧也展示批注:条数 + 侧车路径;note 本身在 overview 里按页 / 时间范围展示)
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.
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": {
"path": "<path>"
},
"name": "media_probe"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to a LOCAL file: video, audio recording, or document. URLs and relative paths are rejected — this server never downloads anything. (本地文件绝对路径) | |
| subtitle | No | Choose the subtitle source explicitly (video and audio only, one parameter for all forms). An absolute path to a local subtitle file (.srt, .vtt, .ass, .ssa); a non-negative integer = the ffprobe stream index of a text subtitle track; any other string = a language code matched against track tags.language (case-insensitive; "zh" also matches "chi"/"zho", "en" matches "eng"). An explicit choice never falls back: if it cannot be used, media_probe only reports the reason and the other tools fail with INVALID_ARGUMENT. Omit it for the automatic order (embedded text track, then a sibling subtitle file, then ASR). (显式选择字幕来源:文件路径 / 字幕轨序号 / 语言码) | |
| transcript | No | "auto" (default): use subtitles first (explicit subtitle selection, embedded track, sibling file), ASR only as a fallback. "subtitle": read subtitles only and never call ASR; if there is no subtitle source the result is empty and says why. "off": no transcription at all, neither subtitles nor ASR; visuals only. Applicable to video and audio only. |