dead_code
Find candidate dead code by listing functions and methods with no inbound references. Returns symbols to verify before cleanup.
Instructions
Find symbols that nothing in the indexed graph references — candidate dead code. Lists functions/methods (optionally types/vars) with no inbound call or read edge, after excluding entrypoints, tests, and HTTP handlers that a runtime invokes. Returns CANDIDATES to verify, not a delete list: the call graph misses dynamic dispatch, reflection, and cross-repo callers. Use before a cleanup pass; confirm each with impact(upstream) + a name search first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | Repository name | |
| kinds | No | Comma list of symbol kinds to scan: function,method,class,variable,type_alias,enum (default function,method) | |
| top_k | No | Max candidates to return (default 50) | |
| format | No | Response text encoding: toon (default) | json | |
| include_tests | No | Include symbols defined in test files. Default false. | |
| include_exported | No | Also report exported/public symbols (higher false-positive rate — they may have external callers). Default false. |