Dead Code
find_dead_codeScan your codebase to find declared symbols with no references, distinguishing proven unreachable code from possibly externally used exports. Use it to clean up dead code and reduce maintenance.
Instructions
Finds declared symbols that nothing references. dead_code is proven unreachable within the scan; unreferenced_exports may be used outside it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "find_dead_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File or directory to analyze; must be inside the allowed roots | |
| limit | No | Max items returned per result list (default 20) | |
| max_depth | No | Max directory depth to descend (default unlimited) | |
| max_files | No | Stop after scanning this many files (default unlimited) | |
| extensions | No | Only scan these extensions, e.g. [".ts", ".py"] (default all supported) | |
| include_hidden | No | Include dotfiles and dot-directories (default false) | |
| ignore_patterns | No | Extra gitignore-style patterns to exclude, relative to path |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| _meta | No | ||
| summary | Yes | ||
| dead_code | Yes | ||
| is_directory | Yes | ||
| unreferenced_exports | Yes |