summarize_directory
Walk a directory tree to get per-subdirectory sizes and file counts, plus a ranked list of largest subdirectories, reducing the need for multiple list calls.
Instructions
Walk a directory tree up to a configurable depth and return per-subdirectory sizes and file counts, plus a flat top-N list of the largest subdirs. Saves many list_directory calls. Requires allow_file_read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | . | |
| depth | No | ||
| top_n | No |