get_dead_exports
Find exported symbols with unused export keywords. Get recommendations to remove the export or delete the symbol based on internal usage analysis.
Instructions
Find exported symbols whose export keyword has no external consumer. Each item carries signals (which detectors fired) and recommendation: "remove_export_keyword" when the symbol is still used inside its own file (just un-export it, keep the declaration), "delete_symbol" when no in-file usage was detected. NOTE: this tool flags dead EXPORT KEYWORDS, not necessarily dead SYMBOLS. For strict dead-symbol detection (multi-signal: import graph + call graph + barrel re-exports + intra-file usage, only flags symbols with NO incoming references anywhere) use get_dead_code instead — it will reject anything get_dead_exports tags remove_export_keyword. Paginated: caps result list at limit (default 100, max 500); when more exist the response includes truncated: true and total_dead reflects the full count. Read-only. Returns JSON: { dead_exports: [{ symbol_id, name, kind, file, line, signals, recommendation }], total_dead, total_exports, truncated? }. Set output_format: "toon" for lossless TOON encoding — cheaper LLM tokens on tabular payloads.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_pattern | No | Filter files by glob pattern (e.g. "src/tools/*.ts") | |
| limit | No | Maximum number of dead exports to return (default 100, max 500). When more exist, response carries `truncated: true` and `total_dead` reflects the full count. | |
| output_format | No | Output format. "json" (default) returns JSON, "markdown" returns LLM-friendly fenced markdown (tool-specific), "toon" returns Token-Oriented Object Notation — 30-60% fewer tokens on tabular data, fully lossless. |