cleanse
Remove unused imports and dead variables from JavaScript/TypeScript projects after scanning for dead code. Skips risky elements like functions and exports.
Instructions
Safely removes dead code found by scan_dead_code. Auto-removes unused imports and side-effect-free variables. Skips anything risky (functions, exports, initializers with side effects). Always run scan_dead_code first.
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": {
"project_root": "<project_root>"
},
"name": "cleanse"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_root | Yes | Absolute path to the project root directory | |
| dry_run | No | If true, shows what would be removed without modifying files. |