file

v1.0.1
io.github.rog0x/file Checked 2 days ago Published 8 months ago

Dir 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.

ParameterTypeDescription
dir_path *stringAbsolute path to the directory
ignore_patternsarrayPatterns to ignore (default: node_modules, .git, dist, __pycache__, .next, .cache, coverage)
max_depthnumberMaximum 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.

ParameterTypeDescription
dir_path *stringAbsolute path to the directory
max_depthnumberMaximum 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.

ParameterTypeDescription
dir_path *stringAbsolute path to the directory
max_depthnumberMaximum depth to traverse (default: 10)
min_sizenumberMinimum 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).

ParameterTypeDescription
dir_path *stringAbsolute path to the directory
max_depthnumberMaximum depth to traverse (default: 10)