Rename / Move a File
litewrite_rename_fileRename or move a file or folder in a Litewrite project by providing a new name or target path.
Instructions
Rename or move a file/folder in a Litewrite project (POST /api/internal/files/rename).
Args:
projectId (string, required): The project id.
sourcePath (string, required): Current relative path.
newName (string, optional): New name (keeps the same parent).
targetPath (string, optional): Full target relative path to move it.
Provide at least one of newName or targetPath.
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": {
"projectId": "<projectId>",
"sourcePath": "<sourcePath>"
},
"name": "litewrite_rename_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| newName | No | New name within the same folder | |
| projectId | Yes | The Litewrite project id | |
| sourcePath | Yes | Current relative path | |
| targetPath | No | Full target relative path |