module_to_package
Converts a Python module file into a package by creating a directory for it and moving the module to init.py, rewriting relative imports as absolute. Preview changes with dry-run; set apply=true to execute.
Instructions
Convert a Python module file into a package: creates a directory of the module's name and moves the module to its init.py, rewriting relative imports to absolute. Pass the module's file path alone; no Position needed. Defaults to a Dry Run preview (created and moved entries appear in the Blast Radius); set apply=true to write. Use your LSP for navigation and reading; this tool only restructures.
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": "module_to_package"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| root | No | ||
| apply | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||