analyze_directory
Directory tree with LOC, function, and class counts; respects .gitignore
How to use it
analyze_directory is exposed by the Aptu Coder MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the analyze_directory tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Aptu Coder
aptu-coderOther tools in Aptu Coder (6)
Functions, classes, and imports with signatures and line ranges; returns graceful fallback (line count, file head, no AST) for unsupported extensions
Lightweight function and import index (~75% smaller than analyzefile); returns graceful fallback (empty index with note) for unsupported extensions
Call graph for a named symbol across a directory; callers, callees, call depth
Create or overwrite a file; creates parent directories
Replace a unique exact text block or all non-overlapping occurrences (replaceall=true); errors if zero or multiple matches; empty newtext deletes the block; CRLF normalized before matching; optional expectedcontenthash (blake3 hex of raw bytes) rejects stale edits; concurrent edits to the same file
Run a shell command; returns stdout, stderr, exit code; output capped and filtered; optional timeoutsecs (kill on expiry) and draintimeoutsecs (post-exit drain window); heredoc rejected before spawn (file-write pattern, stdin-consuming flag, stdin parameter conflict, or missing closing delimiter)