b2_largest_files
Find which files consume the most storage in a Backblaze B2 bucket. Returns file names, sizes, and upload times, with optional prefix filtering and a scan cap for large buckets.
Instructions
List a bucket's largest objects by size via a live listing. For 'largest files', 'what's taking up space in '. Give the bucket by name or bucketId; optional path prefix. Sorting by size requires a full listing, so on very large buckets the scan is bounded by max_scan and a time budget — it then returns the largest among the objects scanned with truncated=true; pass a prefix to focus on a subtree for a complete ranking. Returns name, size, and upload time — never contents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | How many of the largest files to return (default 10, max 100). | |
| bucket | Yes | Bucket name or bucketId to inspect. | |
| prefix | No | Optional path prefix, e.g. "checkpoints/". | |
| max_scan | No | Safety cap on objects scanned (default 50,000, max 500,000). Buckets with millions of files cannot be fully sorted by size in one live call; the scan stops at this cap (or a time budget) and returns truncated=true. Narrow with prefix for an exhaustive ranking of a subtree. |