scan_folder_for_media
Scan a folder to find all audio and video files, returning per-file details and aggregate statistics like total count and duration.
Instructions
Scan a folder for audio + video files (recursive by default). Use this when the user says "find all my voice memos", "what recordings do I have in this folder", "look in my Music folder", or before bulk_ingest_to_clone so the agent knows what's there. Returns per-file { path, name, ext, sizeBytes, modifiedAt, kind, durationSec? } plus aggregates (audioCount, videoCount, totalSizeBytes, totalDurationSec). Audio durations are extracted via music-metadata. Capped at 500 results to prevent runaway responses (truncated:true in that case); recursion depth capped at 6 to prevent symlink loops. Permission-denied subdirectories are silently skipped. Read-only — no side effects.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute or tilde-expanded folder path to scan. | |
| recursive | No | Walk subdirectories. Defaults true. |