move
Relocate Python symbols or modules and update imports project-wide. Use LSP coordinates to target; dry-run preview, apply to write.
Instructions
Move a Python symbol or module and update imports project-wide. Three targets, one tool: a global function/class/variable at a Position moves to another module (pass destination: that module's file path); a method at a Position moves to the class held by an attribute of self (pass destination_attribute, and optionally new_name); a whole module or package moves into a package when you omit line/character entirely (pass destination: the package directory). Coordinates are 0-based LSP line/character (UTF-16 units), exactly as your LSP returns them — locate the symbol with the LSP first. Defaults to a Dry Run preview; set apply=true to write. Prefer a clean git tree before applying, since git is the reversal mechanism. Moved resources report old_path; new files report created.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| line | No | ||
| root | No | ||
| apply | No | ||
| new_name | No | ||
| character | No | ||
| destination | No | ||
| expected_symbol | No | ||
| destination_attribute | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||