Skip to main content
Glama

scan_photos

Recursively scans a local photo directory to generate metadata, fingerprints, and duplicate or corrupted-file lists; optionally creates thumbnails.

Instructions

递归扫描本地图片目录,生成元数据、指纹与重复/损坏清单;可同时生成缩略图。

:param source_dir: 已克隆到电脑的图片目录。 :param thumbs_dir: 缩略图输出目录;留空则不生成缩略图。 :param max_side: 缩略图最长边像素。 :param config_path: 可选 JSON 配置文件路径(扩展名/跳过目录/哈希阈值等)。

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": {
      "source_dir": "<source_dir>"
    },
    "name": "scan_photos"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_sideNo
source_dirYes
thumbs_dirNo
config_pathNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden; it discloses that the scan is recursive and that it produces metadata, fingerprints and duplicate/corruption reports plus optional thumbnails, which is meaningful. It does not say whether the scan writes anything other than thumbnails to disk, where the generated metadata/inventory is stored, whether it is idempotent or how expensive it is on large libraries.

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 capability statement is front-loaded in one dense sentence, followed by a compact parameter list where each line adds distinct information. No filler or restated title, though the docstring-style param block is somewhat terse for readers unfamiliar with the config file format.

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?

An output schema exists, so return value explanation is not required, and all four parameters are documented. What remains missing is behavioral context an agent needs for a no-annotation, filesystem-touching tool: side effects beyond thumbnail generation, permission/scale caveats, and how the produced inventory relates to downstream tools like build_archive_plan or query_ledger.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must carry all parameter meaning, and it does: source_dir is the local cloned photo directory, thumbs_dir blank means no thumbnails, max_side is the thumbnail long-edge pixel size, and config_path is an optional JSON config covering extensions, skipped directories and hash thresholds. Only max_side's default value and units edge cases are left to the schema.

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 first clause states a specific verb and resource ('递归扫描本地图片目录') and enumerates the concrete artifacts produced: metadata, fingerprints, a duplicate/corrupt inventory, and optionally thumbnails. It does not name any sibling or explain how it differs from archive_photos or inspect_archive, so it stops short of a 5.

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?

The source_dir note ('已克隆到电脑的图片目录') implies the prerequisite that photos must already be cloned locally, and the thumbs_dir note implies thumbnails are opt-in. However, there is no statement of when to choose this scan versus alternative tools such as inspect_archive or quality_filter, and no exclusions or follow-up guidance.

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