scan_disk
Scan a drive or folder using WizTree to analyze disk usage and import results into a database for querying. Optionally generate a treemap image.
Instructions
Scan a drive or folder with WizTree and import results into the database.
This is the primary data ingestion tool. It:
Locates the WizTree CLI executable
Runs WizTree to export CSV (and optional treemap PNG)
Streams the CSV into SQLite (memory-efficient, <50 MB)
Returns a scan summary
After scanning, use other tools (disk_summary, top_entries, etc.) to query the results.
Args: target_path: Drive or folder to scan (e.g., "C:", "D:\Projects"). label: Optional human-readable label for this scan (e.g., "Cleanup Prep"). max_depth: Maximum folder depth to export (None = unlimited). Use a small value like 5 to reduce CSV size for quick scans. export_folders: Include folder entries in the export. export_files: Include file entries in the export. treemap: Also generate a treemap PNG image alongside the CSV. timeout: Maximum seconds to wait for the WizTree scan to complete. ctx: MCP context (injected automatically).
Returns: JSON string with scan result summary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | No | ||
| timeout | No | ||
| treemap | No | ||
| max_depth | No | ||
| target_path | Yes | ||
| export_files | No | ||
| export_folders | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |