Skip to main content
Glama

目录媒体体检

probe_dir

Batch-inspect a directory to identify file types by magic bytes, sizes, and modification times, extract video duration/resolution/codec and image dimensions, and summarize usage by media category.

Instructions

批量体检一个目录:逐个文件的类型(魔数嗅探)、大小、修改时间,视频给出时长/分辨率/编码,图片给出尺寸,并按图片/视频/音频/文档/压缩包汇总占用。比逐个调 get_video_info 省往返。

Input Schema

NameRequiredDescriptionDefault
sortNo排序依据:mtime(默认,最新在前)或 size(最大在前)
limitNo最多返回前几个文件,默认 20,上限 60
dir_pathYes目录绝对路径,例如 /sdcard/DCIM/Camera
recursiveNo是否递归子目录,默认 false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.2

TDQS

A3.9/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It clearly implies a read-only inspection ('体检', '嗅探') and discloses the inspection techniques (magic-number sniffing) and aggregation behavior, which is useful. However, it does not state how large directories, permission-denied paths, or missing directories are handled, nor the cost of scanning, so an agent cannot predict failure or latency behavior.

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 purpose is front-loaded in the opening clause, and the enumeration of per-file fields is dense but readable. The closing comparison sentence earns its place by providing routing guidance. It could be tightened slightly, but there is no filler.

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?

There is no output schema, so the description must convey return values, and it does describe per-file fields and the category-level totals that an agent can expect. Gaps remain around error cases (nonexistent path, unreadable files) and whether the limit truncates the aggregates, but the core contract is covered.

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 sort, limit, recursive, and dir_path are already fully documented including defaults and enum meanings. The description adds no additional parameter guidance such as when to set recursive or how limit interacts with the per-category totals. Baseline 3 applies.

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 gives a specific verb and scope ('批量体检一个目录' — inspect a directory in bulk) and enumerates exactly what is reported per file: magic-number type, size, mtime, video duration/resolution/codec, image dimensions, plus category totals. It also names the sibling it replaces, so an agent can tell it apart from get_video_info immediately.

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

Usage Guidelines4/5

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

It states an explicit alternative and a reason to choose this tool ('比逐个调 get_video_info 省往返'), which is real routing guidance. However, there are no when-not-to-use conditions and it does not relate to other similar siblings such as storage_report, find_duplicates, or read_exif, so the agent must infer whether it subsumes them.

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