scan_library
Recursively scan a directory to summarize file counts by extension, total bytes, and earliest/latest modification times, helping you assess a photo library's size and structure without reading file contents.
Instructions
Recursively scan a directory and summarize what is in it.
Walks root recursively (symlinks are not followed) and reports file counts by extension, total bytes, and the earliest/latest file modification time. Stops after 50000 files and reports truncation if the library is larger than that. Does not read file contents or EXIF; use library_stats for EXIF aggregates.
Args: params (ScanLibraryInput): Validated input containing: - root (str): Directory to scan, must be inside an allowed --root
Returns: dict: { "schema_version": 1, "root": str, "total_files": int, "total_bytes": int, "counts_by_extension": {".jpg": int, ...}, "earliest_mtime": str | None, # ISO 8601 UTC "latest_mtime": str | None, # ISO 8601 UTC "truncated": bool, "truncation_note": str | None, } On error: {"schema_version": 1, "error": str}
Examples: - Use when: "How many files are in my 2026 shoot folder and how big is it?" - Don't use when: you need EXIF camera/lens breakdowns (use library_stats)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |