file
v1.0.1Dir tree, file stats, duplicates, LOC for AI agents
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
dir_tree
Generate a visual directory tree structure (like the `tree` command). Shows files and folders with configurable depth and ignore patterns.
| Parameter | Type | Description |
|---|---|---|
dir_path * | string | Absolute path to the directory |
ignore_patterns | array | Patterns to ignore (default: node_modules, .git, dist, __pycache__, .next, .cache, coverage) |
max_depth | number | Maximum depth to traverse (default: 5, 0 = unlimited) |
file_stats
Analyze a directory: total files, total size, file count by extension, largest files, newest/oldest files.
| Parameter | Type | Description |
|---|---|---|
dir_path * | string | Absolute path to the directory |
max_depth | number | Maximum depth to traverse (default: 10, 0 = unlimited) |
duplicate_finder
Find duplicate files by comparing size and MD5 hash. Returns groups of duplicates with paths and wasted space.
| Parameter | Type | Description |
|---|---|---|
dir_path * | string | Absolute path to the directory |
max_depth | number | Maximum depth to traverse (default: 10) |
min_size | number | Minimum file size in bytes to consider (default: 1) |
code_counter
Count lines of code by programming language: total lines, code lines, comment lines, blank lines (like cloc/scc).
| Parameter | Type | Description |
|---|---|---|
dir_path * | string | Absolute path to the directory |
max_depth | number | Maximum depth to traverse (default: 10) |
file_search
Search for files by name pattern (glob), content (regex), size range, and/or date range.
| Parameter | Type | Description |
|---|---|---|
dir_path * | string | Absolute path to the directory to search |
content_pattern | string | Regex pattern to search within file contents |
max_results | number | Maximum number of results to return (default: 100) |
max_size | number | Maximum file size in bytes |
min_size | number | Minimum file size in bytes |
modified_after | string | ISO date string - only files modified after this date |
modified_before | string | ISO date string - only files modified before this date |
name_pattern | string | Glob pattern for file names (e.g. "**/*.ts", "*.json") |