Find dead code
analyzeFind dead code in a project: unused functions, classes, imports, variables, parameters, and files. Returns JSON cleanup candidates; read-only, no code edits.
Instructions
Find dead code: unused functions, classes, imports, variables, parameters and files.
Use this to list cleanup candidates in a project. Returns JSON with a
summary and per-category findings (file, line, name, confidence) plus
_run_id; the full result is stored locally and can be read from the
skylos://results/{run_id} resource. Read-only: it never edits code.
Findings are candidates: before deleting one, check for dynamic use
(getattr, string dispatch, entry points, framework decorators, tests).
A non-empty analysis_errors means analysis or verification was
incomplete; do not treat the findings as a complete scan.
Defect and Review records remain complete. Advice is grouped by default; expand_advice=True includes every Advice record. Read _result_uri for the complete saved result without rescanning.
Works without SKYLOS_API_KEY (5 calls/day); higher limits with a key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Directory or file to scan. A relative path resolves against the MCP server's working directory. | |
| confidence | No | Minimum confidence (0-100) for dead-code findings. Higher values report fewer, surer candidates; 60 is the CLI default. | |
| expand_advice | No | Include every Advice record instead of rule-group counts; complete results are always available through _result_uri. | |
| exclude_folders | No | Folder names to skip, e.g. ["migrations", "scripts"]. When given, this list replaces the default excludes (node_modules, .venv, build, dist and similar); omit it to keep the defaults. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |