Skip to main content
Glama

Overview

media_overview
Read-only

Generate a readable overview of a local video, audio recording, or document—storyboard grids, timestamped transcripts, page thumbnails, and page-aligned text—so you can inspect it without guessing.

Instructions

Build an overview of a local media file so you can read it without guessing. (生成媒体总览:视频出分镜宫格图与按时间对齐的文本清单;录音出带时间轴的转写;文档出页面缩略图与每页文字。)

What you get depends on the media:

  • video : one or more numbered storyboard grids (each cell carries its cell number) plus a time-aligned text index of the cells

  • audio : a timestamped transcript, segment by segment

  • document : a grid of page thumbnails plus page text, when a document parser is configured

For DOCUMENTS, ocr: "auto" (default) uses the PDF text layer where one exists and calls the OCR provider only for pages without one; ocr: "force" re-recognizes every requested page with the OCR provider, even pages that already have a text layer, and tags them (ocr). Use force when media_probe says "text layer: looks unreliable" or when the extracted text is visibly garbled. Forced results are cached separately from auto. (文档:ocr: "force" = 强制重新 OCR / 重新识别文字层)

Pass images: 0 for a text-only, zero-pixel overview: no grid is rendered and no frame is decoded (a video costs no ffmpeg work at all), so you get only the transcript — or the page text for a document — and the reported budget is all zeros. Use it when you only need the words.

TEXT SOURCE ORDER — subtitles first, ASR only as a fallback:

  1. a subtitle you select explicitly (external subtitle file, track index or language code),

  2. the subtitle track embedded in the container,

  3. a subtitle file with the same base name in the same directory (a.srt next to a.mp4),

  4. ASR — only when none of the above exists and an ASR provider is configured. Every segment is tagged with its source. subtitle = from a subtitle file/track; usually the author's words, but may be auto-generated: check names and numbers against the frame. asr = machine transcription: names, numbers and jargon are often wrong, so do NOT quote an ASR segment verbatim and do not present it as the speaker's exact words. visual = there is no text at all, only the picture.

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 text of the result ends with a line like "full text: /abs/path/content.md (segments.jsonl, manifest.json in the same directory)". That absolute path is what you read: content.md is the readable full text, segments.jsonl has one segment per line, manifest.json records 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. If the export could not be written, the line reads "full text: NOT written — " instead.

The inline text is a PREVIEW with three tiers. (1) WHOLE: the requested range fits, and the result says "complete text ... nothing omitted". (2) SKIM (documents only, when the document parser exposes block structure): every heading plus the first complete sentence of each paragraph, tables as "[table: caption]", with captions/footnotes/equations left out; each page is labelled like "[page 4 · skim: 12 of 210 sentences]". A skim built from the built-in heuristic blocks is best-effort — section structure may be wrong; read content.md for the authoritative text. (3) SAMPLED: complete units — document sentences, video/audio transcript segments — are sampled evenly, with a line like "preview: sampled 84 of 312 sentences across pages 1-28; not represented: 2-6, 8-12". In a skim that still does not fit, all headings are kept and sentences are sampled; only when even the headings do not fit are the headings sampled. Sampling never drops a whole page silently: pages that could not be represented are listed, and a single over-long unit is truncated with a trailing "…[+N chars]". Read content.md when you need the complete text.

VIEW — the view parameter controls the inline text (default "auto"). The result carries ONE outline 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, or chapter markers in video/audio); a document without bookmarks may get an outline GENERATED FROM ITS HEADINGS when the range has at least 5 headings, labelled "outline: generated from headings" (best-effort). (1) "auto": if the requested range fits, you get the full text; if it does not fit and there is an outline, the outline comes first (ids b1…bN with page numbers for PDFs, timestamps for chapters) and the rest of the budget goes to the text preview; if there is no outline, you get the normal skim/sampled preview. (2) "outline": return only the outline — generated from headings for a document without bookmarks; for video/audio without chapters you get an explicit "no chapters" message and NOTHING is generated, because this server never invents an outline from content. In that case read the overview (or a start/end window) and write your own outline from the time-aligned text and storyboard grids. (3) "text": ignore the outline and force the text pipeline. The full outline (entries, source, sidecar path) is always in structuredContent.outline and, for an overview that writes an export, in manifest.json. When a sidecar exists its last outline line is "full detail: " — read that file for the complete bookmark detail. (目录:sidecar 优先,其次文件自带目录,最后才是 heading 生成;view:auto 放不下时先出目录;view:outline 只出目录;view:text 只出文本)

The result also carries the ANNOTATIONS of the requested range, right next to the page / time range they belong to: the annotation sidecar (".mmgrep.annotation.json", written by media_annotate) when one exists, otherwise the file's own annotations (PDF annotation objects). One annotation per line, in the same shape media_annotate writes ("n3 (p.12): note" for PDFs, "n3 (00:12:34–00:12:39): note" for video/audio). The line starts with the annotation id (n1, n2, …) — these are the ids media_annotate accepts. The author is in structuredContent.annotations only; the note text is shown as written. (批注按请求范围展示:行首 n1…nN 就是 media_annotate 的 id)

Always call media_probe first: it tells you how long the file is, whether a subtitle source exists, which transcript source applies, and which outline applies (bookmark sidecar first, then the file's own PDF bookmarks / video-audio chapters, or headings for a document), 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.

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_overview"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoWindow end in seconds (closed interval, both ends included). Applicable to video and audio only. Defaults to the end of the media; a value past the end is clipped and reported. (终点,秒)
ocrNoDocument media only: how to obtain page text. "auto" (default) uses the PDF text layer where one exists and OCR only for pages without one. "force" re-recognizes every requested page with the OCR provider even if it already has a text layer, and tags those pages (ocr); use it when media_probe says "text layer: looks unreliable" or the extracted text is garbled. Forced results are cached separately from "auto". Requires a configured OCR provider; not applicable to video or audio. (文档:ocr auto 默认;force = 强制重新 OCR / 重新识别文字层)
pathYesAbsolute path to a LOCAL file: video, audio recording, or document. URLs and relative paths are rejected — this server never downloads anything. (本地文件绝对路径)
viewNoWhat to put in the inline text. "auto" (default): the full text of the requested range when it fits; otherwise, when there is an outline (the bookmark sidecar when it exists, otherwise PDF bookmarks / video-audio chapters, or ≥ 5 document headings), the outline comes first and the remaining budget goes to a text preview; files without an outline use the normal skim/sampled preview. "outline": return only that same single outline (generated from headings for a document without bookmarks; an explicit "no chapters" message for video/audio — this server never invents an outline from content). "text": force the text pipeline and ignore any outline. The sidecar wins over the file's own outline, and its last outline line is "full detail: <sidecar path>". (返回内容:auto 自动;outline 只出目录(sidecar 优先);text 只出文本)
cellsNoCells per puzzle image: storyboard shots for video, page thumbnails for document. 1-16; default 9 for video and 6 for document. Applicable to video and document only. (每张拼图的格数)
pagesNoPage range for document media: comma-separated 1-based page numbers and closed ranges, e.g. "3-10,15". Not applicable to video or audio. (页码范围)
startNoWindow start in seconds (closed interval, both ends included). Applicable to video and audio only; document media uses "pages" instead. Default 0. (起点,秒)
imagesNoHow many puzzle images to return: 0-4, default 2. Use 0 for the text-only mode: zero pixels — for video nothing is scanned and no frame is decoded, for audio no waveform is drawn, for document no page is rendered; only the transcript (or page text) comes back and the budget is all zeros. Applicable to video and document; audio accepts 0 only. (返回几张拼图;0 = 纯文本模式)
maxEdgeNoLongest edge of each image in pixels: 256-1600. Default 1280 for overview, 1600 for zoom. Applicable to video and document only. (单张图最长边)
segmentNoWindow length in seconds (30-3600, default 300), used when only "start" is given. Applicable to video and audio only.
envelopeNoAttach an audio envelope waveform image (default false). Applicable to audio recordings only. (音频包络图)
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. Changed7 schema fields changedv0.3.0
    • changedInput schema / properties / images / description
      Previous value: -"How many puzzle images to return: 1-4, default 2. Applicable to video and document only. (返回几张拼图)"New value: +"How many puzzle images to return: 0-4, default 2. Use 0 for the text-only mode: zero pixels — for video nothing is scanned and no frame is decoded, for audio no waveform is drawn, for document no page is rendered; only the transcript (or page text) comes back and the budget is all zeros. Applicable to video and document; audio accepts 0 only. (返回几张拼图;0 = 纯文本模式)"
    • addedInput schema / properties / ocr
      Added value: +{
      +  "description": "Document media only: how to obtain page text. \"auto\" (default) uses the PDF text layer where one exists and OCR only for pages without one. \"force\" re-recognizes every requested page with the OCR provider even if it already has a text layer, and tags those pages (ocr); use it when media_probe says \"text layer: looks unreliable\" or the extracted text is garbled. Forced results are cached separately from \"auto\". Requires a configured OCR provider; not applicable to video or audio. (文档:ocr auto 默认;force = 强制重新 OCR / 重新识别文字层)",
      +  "enum": [
      +    "auto",
      +    "force"
      +  ],
      +  "type": "string"
      +}
    • 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"
      -}
    • addedInput schema / properties / view
      Added value: +{
      +  "description": "What to put in the inline text. \"auto\" (default): the full text of the requested range when it fits; otherwise, when there is an outline (the bookmark sidecar when it exists, otherwise PDF bookmarks / video-audio chapters, or ≥ 5 document headings), the outline comes first and the remaining budget goes to a text preview; files without an outline use the normal skim/sampled preview. \"outline\": return only that same single outline (generated from headings for a document without bookmarks; an explicit \"no chapters\" message for video/audio — this server never invents an outline from content). \"text\": force the text pipeline and ignore any outline. The sidecar wins over the file's own outline, and its last outline line is \"full detail: <sidecar path>\". (返回内容:auto 自动;outline 只出目录(sidecar 优先);text 只出文本)",
      +  "enum": [
      +    "auto",
      +    "outline",
      +    "text"
      +  ],
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint, so the description carries the real burden and does: it discloses that full text is exported to disk with an absolute path (content.md, segments.jsonl, manifest.json), the three preview tiers (whole/skim/sampled) and how each truncates, the subtitle-before-ASR source order with per-segment tagging, and forced-OCR caching being separate from auto. It also documents failure text ("full text: NOT written — <reason>") and a lexical side effect not visible in annotations (it writes export and sidecar files next to the media).

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?

Structure is strong — per-media output list, then ocr, then text-source order, then export, preview tiers, view, annotations, and prerequisites — and the purpose is front-loaded. However the text runs very long, repeats whole paragraphs in Chinese parentheses, duplicates schema text for view/ocr/images, and restates the media_probe instruction twice. Density is high but a meaningful fraction of it does not earn 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?

For a 13-parameter tool with no output schema, the description covers what is returned inline vs on disk, where the outline and annotations come from (sidecar precedence over file-native), what the budget/continuation hints mean, and what happens when an export or subtitle source fails. Nothing an agent needs in order to call it correctly or interpret the result is missing.

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

Parameters3/5

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

Schema coverage is 100% and the schema descriptions for ocr, view, images and subtitle are near-verbatim restatements of the description text, so most parameter explanation here is duplication rather than added meaning. The genuinely additive parts are cross-parameter behavior (how view interacts with the outline and the remaining budget, why images:0 costs no ffmpeg work), which the schema does not convey. Baseline 3 is appropriate given the schema already does the heavy lifting.

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?

States a concrete verb and resource ("Build an overview of a local media file") and immediately enumerates what the overview contains for each of the three media types (video storyboard grids, audio timestamped transcript, document page thumbnails). It explicitly separates itself from siblings by name, telling the agent that media_zoom is for reading a single frame and media_probe is the mandatory first step.

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?

Gives explicit when-to-use rules: call media_probe first, narrow long media with start/end or pages, use ocr:"force" only when media_probe reports an unreliable text layer or text is garbled, and use images:0 when only words are needed. It also names alternatives and the condition that selects them (media_zoom instead of the storyboard grid for reading on-screen text; write your own outline when view:"outline" returns "no chapters").

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