sftp_rm
Deletes a file or directory on a remote host over SFTP, with optional recursive removal for non-empty directories. Use it to clean up remote paths by connection ID.
Instructions
Remove a file or directory on the remote host via SFTP.
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": {
"connectionId": "<connectionId>",
"remotePath": "<remotePath>"
},
"name": "sftp_rm"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| recursive | No | Recursively delete directory contents (default false). Required for non-empty directories. | |
| remotePath | Yes | Remote path to remove | |
| connectionId | Yes | Connection ID from ssh_connect |