rename_file
Rename a file or directory to a new name within its current folder. Optionally overwrite existing files or preview the action with a dry run.
Instructions
Rename a file or directory within its current parent directory.
Args: path: Existing file or directory path new_name: New file name only, not a path overwrite: Allow replacing an existing destination dry_run: Return the planned action without renaming
Returns: JSON string with operation details or an error message
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": {
"path": "<path>",
"new_name": "<new_name>"
},
"name": "rename_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| dry_run | No | ||
| new_name | Yes | ||
| overwrite | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |