Skip to main content
Glama

Analyze a video, audio, or image file or URL

analyze_media

Extract visual and textual context from video, audio, or image files locally—frames, transcripts, OCR, and scene changes—for AI analysis.

Instructions

Turn a local media file or URL (video, audio, or image) into compact context a model can read — fully local, no paid APIs. Video: montage frames (mode 'sheet', cheapest default), individual stills ('frames'), or scene changes ('scenes'); add transcript and/or ocr. Audio: speech transcript. Image: the picture plus optional OCR. For app/screen recordings use detail:'high' + ocr:true. To catch a transient UI glitch (a flicker/jump lasting <1s), use mode:'filmstrip' with a narrow startSec/endSec window, a high fps (10–15), and a crop around the affected control — it stacks dense frames so you can spot a frame whose value disagrees with the visual. Use the cheap default for everything else. Pass context to frame the analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesLocal media file path (video, audio, or image) OR an http(s) URL.
contextNoOptional note about the video to frame the analysis, e.g. 'signup flow, focus on the validation error'.
detailNohigh = readable stills for screen recordings (frames + large scale + png); low = cheap montage. Overrides only the fields you leave unset.
modeNosheet = montage grids (cheapest, default); frames = individual stills; scenes = only scene-change montages; filmstrip = dense near-native-fps vertical strip for catching transient UI glitches (pair with a narrow startSec/endSec window, fps, and crop).sheet
formatNoImage encoding. webp = smallest/fewest tokens (default); png = lossless for crisp text.webp
maxFramesNoUpper bound on sampled frames across the whole window.
gridNoTiles per row/column for sheet/scenes modes (grid x grid).
scaleNoWidth in px of each frame before tiling. Lower = fewer tokens.
sceneThresholdNoScene-change sensitivity for 'scenes' mode (higher = fewer cuts).
fpsNoExplicit sampling rate (frames/sec); overrides the auto rate for sheet/frames/filmstrip. Use a high value (e.g. 10–15) with filmstrip to catch sub-second glitches.
cropNoRectangle to crop before sampling — zoom into a UI region for sharper frames/OCR. Pixels, or fractions 0–1 of the frame (e.g. {x:0,y:0.7,width:1,height:0.3} = bottom 30%).
stripRowsNoTiles stacked per image in 'filmstrip' mode.
startSecNoWindow start in seconds.
endSecNoWindow end in seconds.
transcriptNoAlso run local Whisper to produce a speech transcript.
whisperModelNoWhisper model name (tiny, base, small, medium, large).small
ocrNoExtract on-screen text via OCR — ideal for app/screen recordings. Implies detail:high unless set.
ocrLangNoTesseract language code(s) for OCR, e.g. 'eng' or 'eng+deu'.eng
ocrPsmNoTesseract page-segmentation mode. 3 = auto (default), 6 = uniform block, 11 = sparse/scattered UI labels.
ocrMaxFramesNoFrames to OCR (sampled at full resolution, independent of the display images).
detectJumpsNoTrack the on-screen number (e.g. a slider %) across frames and report non-monotonic 'jump-back' glitches with timestamps. Pair with a crop around the value and a narrow window for best results.
maxDurationSecNoReject URL downloads longer than this many seconds.
maxFileSizeMbNoAbort a URL download once it exceeds this size in MB.
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses local processing, no paid APIs, and default behaviors for modes. However, it could be more explicit about output format (e.g., what the tool returns) and potential side effects like file generation.

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

Conciseness4/5

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

The description is well-structured with a clear summary, media-type breakdown, and use-case examples. It is detailed but not excessively long. Minor redundancy could be trimmed, but overall efficient.

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

Completeness4/5

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

Given the complexity (23 params, no output schema), the description covers most aspects: purpose, mode usage, parameter guidance, and example workflows. It lacks explicit description of the output format (e.g., what is returned as 'context'), but the 'compact context' phrasing implies model-readable text/images.

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

Parameters5/5

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

While schema coverage is 100%, the description adds significant value by explaining parameter interactions (e.g., crop + filmstrip, fps + filmstrip) and providing concrete examples for transient glitch detection. It clarifies that detail overrides unset fields and that OCR implies detail:high unless set.

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?

The description clearly states the tool converts local media files or URLs into compact context for models, covering video, audio, and image. It distinguishes video modes (sheet, frames, scenes, filmstrip) and provides specific use-case examples, effectively differentiating from sibling tool check_media_deps.

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 guidance for when to use specific modes: 'For app/screen recordings use detail:'high' + ocr:true', 'To catch a transient UI glitch ... use mode:'filmstrip' with ...', 'Use the cheap default for everything else.' Also advises to 'Pass context to frame the analysis.'

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vishalguptax/media-context-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server