Skip to main content
Glama
media-preview
by JustBipin

Inline Media Preview

preview_media

Render local video, audio, and image files as inline chat previews, including playable players, waveforms, filmstrips, and thumbnails without loading raw media into model context.

Instructions

Render an inline video player (9:16 or 16:9), waveform audio player, or image filmstrip directly inside chat for local media files.

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": {
      "paths": "<paths>"
    },
    "name": "preview_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
loopNoLoop video/audio playback (useful for Shorts loop checks). Defaults to false.
modeNo"default" shows full inline previews (video-sized single image, 82px gallery strip for multiple images, compact video/audio). "peek" shows tiny right-aligned 30px micro-thumbnails when silently inspecting frames while working.
pathsYesAbsolute file paths to local video (.mp4, .webm, .mov), audio (.wav, .mp3, .ogg, .m4a, .flac), or image (.png, .jpg, .webp, .gif, .svg) files.
autoplayNoAutoplay on load (muted if required by browser policy). Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It says what will be rendered, but it does not disclose whether the operation is read-only or non-destructive, what happens with missing or unsupported files, or any path restrictions. For a tool that accepts arbitrary local file paths, this is a meaningful gap.

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

Conciseness5/5

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

The description is a single front-loaded sentence that states the primary action and supported media categories without filler. Every phrase contributes to identifying what the tool renders.

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

Completeness3/5

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

The tool is moderately complex, with four parameters, one enum, and no output schema or annotations. The description covers the rendering purpose and media types, but it does not provide enough guidance on tool selection or behavioral safety for local file paths. The complete schema helps, but the description alone leaves important context gaps.

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 description coverage is 100%, so the schema already documents all four parameters in detail, including accepted media formats and enum behavior. The description adds only a brief note about video aspect ratios and player types, which is useful but not essential beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: render an inline video, audio, or image preview inside chat for local media files. It clearly states the visual output types and aspect ratios. It stops short of differentiating this tool from sibling tools such as resolve_media or open_modal.

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

Usage Guidelines3/5

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

Usage is implied: use this when you want to display local media inline in chat. However, the description does not explicitly say when not to use it, nor does it name alternatives for resolving media or opening a modal. An agent can infer the general context but must still decide between related tools without help from this description.

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

Deploy Server

Other Tools