ssh_file_move
Move or rename remote files and directories over SSH. Optionally overwrite existing destinations or use sudo for permission-restricted paths.
Instructions
Move or rename a file or directory (works for both - whichever source is).
If destination already exists: fails cleanly with overwrite=False (default);
with overwrite=True, it's replaced (mv -f/Move-Item -Force). If source
doesn't exist, also fails cleanly rather than raising.
Returns:
{'success': True, 'message': str} on success, or {'success': False, 'message': str} on failure (source not found, destination exists and
overwrite=False, permission error) - not a raised exception.
Long-running calls: if this takes longer than the server's wait cap (default 50s), it
returns {"status": "in_progress", "handle_id": ...} instead of the result - the work keeps
running. Get the result by polling ssh_cmd_check_status(handle_id=...), which returns this
tool's normal response once finished. Do not call it again meanwhile. Only one such
operation runs at a time; another one started meanwhile fails with a 'busy' error.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Source file or directory path | |
| use_sudo | No | Use sudo for the operation | |
| overwrite | No | Overwrite destination if it exists | |
| destination | Yes | Destination path |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||