Refactoring
refactoringRename symbols, extract functions, or move code between files with automatic import updates. Safely refactor TypeScript/JavaScript using the compiler for type-aware transformations.
Instructions
Rename symbols, extract functions, or move symbols to files (auto-updates imports).
vs Edit: Updates ALL refs (imports, JSDoc, dynamic imports). Impossible by hand.
Use when: Renaming, extracting, or moving symbols between files. Always use this.
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": {
"operation": "<operation>",
"filePath": "<filePath>",
"line": "<line>",
"text": "<text>"
},
"name": "refactoring"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | ||
| filePath | Yes | ||
| line | Yes | ||
| text | Yes | ||
| name | No | ||
| destinationPath | No | ||
| preview | No |