move_function
Relocate a function from one file to another using Language Server Protocol refactoring to organize code structure and improve maintainability.
Instructions
Move a function to a different file using LSP refactoring
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| character | No | Character position where the function starts | |
| functionName | Yes | Name of the function to move | |
| language | No | Programming language | typescript |
| line | Yes | Line number where the function is located | |
| sourceFile | Yes | Source file containing the function | |
| targetFile | Yes | Target file to move the function to |
Input Schema (JSON Schema)
{
"properties": {
"character": {
"default": 0,
"description": "Character position where the function starts",
"type": "number"
},
"functionName": {
"description": "Name of the function to move",
"type": "string"
},
"language": {
"default": "typescript",
"description": "Programming language",
"type": "string"
},
"line": {
"description": "Line number where the function is located",
"type": "number"
},
"sourceFile": {
"description": "Source file containing the function",
"type": "string"
},
"targetFile": {
"description": "Target file to move the function to",
"type": "string"
}
},
"required": [
"sourceFile",
"targetFile",
"functionName",
"line"
],
"type": "object"
}