Skip to main content
Glama

Probe media

media_probe
Read-only

Inspect 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

NameRequiredDescriptionDefault
pathYesAbsolute path to a LOCAL file: video, audio recording, or document. URLs and relative paths are rejected — this server never downloads anything. (本地文件绝对路径)
subtitleNoChoose 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). (显式选择字幕来源:文件路径 / 字幕轨序号 / 语言码)
transcriptNo"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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.3.0
    • addedInput schema / properties / subtitle
      Added value: +{
      +  "description": "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). (显式选择字幕来源:文件路径 / 字幕轨序号 / 语言码)",
      +  "type": [
      +    "string",
      +    "number"
      +  ]
      +}
    • changedInput schema / properties / transcript / description
      Previous value: -"\"auto\" (default): use subtitles first, ASR only as a fallback. \"off\": no transcription at all, visuals only. Applicable to video and audio only."New value: +"\"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."
    • changedInput schema / properties / transcript / enum
      Previous value: -[
      -  "auto",
      -  "off"
      -]New value: +[
      +  "auto",
      +  "subtitle",
      +  "off"
      +]
    • removedInput schema / properties / transcriptFile
      Removed value: -{
      -  "description": "Absolute path to a local subtitle/transcript file (.srt, .vtt, .ass, .ssa). Applicable to video and audio only. (本地字幕/转写文件)",
      -  "type": "string"
      -}
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Far beyond the given annotations: it discloses cost ('costs no image tokens and decodes nothing'), the outline source priority (bookmark sidecar first, then PDF bookmarks / chapter markers), that pages are 1-based PHYSICAL numbers, the 2-level/60-entry display cap with full data in structuredContent.outline, and that silent recordings are never sent to ASR (no hallucinated transcript). It also twice confirms probing never creates or modifies a sidecar and never downloads or calls an LLM, which is consistent with readOnlyHint/openWorldHint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The front-loading is strong: purpose first, then a bulleted routing block, then detail sections. However it is long for a probe tool and repeats itself — 'Read-only: probing never creates or modifies a sidecar' appears twice, and 'this server never downloads anything' duplicates the path parameter's own schema description — while the bilingual parenthetical restatements add bulk without new information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the full burden and does so: it enumerates every reported field (duration, resolution, page count, codec, tracks, audio health metrics, outline, annotation count), explains the sidecar paths, and describes the outline/annotation id formats ('b3 p.12 title', 'n3 (00:12:34–00:12:39): note') that feed media_bookmark and media_locate. An agent can call this correctly and interpret the result without any other tool's definition.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description still adds value by framing the probe's ASR/OCR readiness check and the 'silent audio is never sent to ASR' guarantee, which gives context for the transcript enum's auto/subtitle/off tradeoff. The subtitle fallback rules live mostly in the schema, so the gain over structured data is modest rather than decisive.

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?

Opening clause gives a specific verb and resource ('Inspect a local media file — video, audio recording, or document') and enumerates exactly what is reported: duration, resolution, page count, codec, tracks, ASR/OCR availability. It is immediately separable from media_overview/media_zoom/media_locate, which are named later as the read/inspect alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit sequencing ('Call this FIRST on any file you have not inspected yet') plus a decision table mapping file type and intent to the correct sibling: video/audio → media_overview, document → media_overview, a moment/page → media_zoom, 'where was X said' → media_locate. It also states the conditions ('when the text layer looks unreliable') under which a follow-up call with ocr: "force" is warranted.

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