ts_organize_imports
Sort and combine imports in TypeScript/JavaScript files, and remove unused ones. Applies changes directly to disk to keep code clean.
Instructions
Sort imports and remove unused ones in a TypeScript/JavaScript file. Applies the changes to disk.
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": {
"file": "<file>"
},
"name": "ts_organize_imports"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Relative file path from project root | |
| skipDestructiveCodeActions | No | Only sort and combine imports, without removing unused ones |