Skip to main content
Glama

视频/媒体元数据探测

get_video_info

Reads local media files to return container, duration, video/audio stream details, and image dimensions using pure JavaScript—no ffprobe required.

Instructions

获取本地媒体文件的容器、时长、视频流(编码/分辨率/帧率/码率)与音频流(编码/声道/采样率/AAC 参数);对图片返回 JPEG/PNG/GIF 尺寸,其他文件返回魔数嗅探。纯 JS 解析,不需要 ffprobe。参数为本地绝对路径。

Input Schema

NameRequiredDescriptionDefault
file_pathYes本地文件绝对路径,例如 /sdcard/DCIM/a.mp4

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.2

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose meaningful behavior: parsing is pure JS with no ffprobe dependency, unsupported files fall back to magic-number sniffing rather than failing silently, and the operation is a read. It does not state what happens on a nonexistent path, permission denial, or large files, which is the remaining gap for a no-annotation tool.

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?

One dense sentence, front-loaded with the verb and resource, with semicolon-separated clauses that each carry distinct information (stream fields, image case, fallback case, implementation note). Nothing is padding, though the clause chain is long enough that a reader must parse it carefully.

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?

No output schema exists, so the description must describe return values and it does so field by field for each file class. Combined with the absolute-path constraint and the ffprobe-free note, an agent has enough to call it correctly; only error/edge-case behavior is unspecified.

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?

There is a single parameter with 100% schema description coverage, and the schema already specifies an absolute local path with an example. The closing clause '参数为本地绝对路径' only restates that constraint, adding no new meaning, so the baseline 3 applies.

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 uses a specific verb (获取/probe) and enumerates exactly what is returned: container, duration, video stream fields (codec/resolution/fps/bitrate), audio stream fields (codec/channels/sample rate/AAC params), plus image dimensions and magic-number sniffing for other files. It is clearly distinguishable from extract_audio_track or probe_dir, but it never explicitly contrasts with read_exif, which also targets image metadata, so the boundary with that sibling is left implicit.

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 by the file-type breakdown (media files get stream info, images get dimensions, anything else gets magic sniffing), which tells an agent when the tool will still return something useful. However, there is no explicit when-to-use/when-not guidance and no named alternative such as read_exif for EXIF fields or extract_audio_track for audio extraction.

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