code_maintain
Cleans up missing or unused imports in touched files, previewing changes by default before applying them. Flags dead code without removing it automatically.
Instructions
Clean up imports in files you touched (missing/unused). plan = preview by default; dead code is never removed automatically, only flagged.
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": {
"workspace_dir": "<workspace_dir>",
"task_id": "<task_id>"
},
"name": "code_maintain"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | Scope; default task materials. | |
| action | No | plan default; apply writes. | |
| dry_run | No | true = preview. | |
| task_id | Yes | Task id. | |
| proposals | No | Fingerprints (default all safe). | |
| request_id | No | Idempotency key. | |
| max_per_file | No | Default 20. | |
| workspace_dir | Yes | Project root (abs). | |
| max_candidates | No | fix_imports candidates per file (default 10, 1-100). | |
| expected_state_revision | No | Optimistic guard. |