sftp_read_file
Read a file from a remote host over SFTP, returning UTF-8 text by default or base64 for binary files. Use a connection ID and absolute remote path to retrieve remote file contents.
Instructions
Read a file from a remote host via SFTP. Returns text by default; set encoding 'base64' for binary files.
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_read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| encoding | No | Output encoding: 'utf8' (default) or 'base64' for binary | |
| remotePath | Yes | Absolute remote file path | |
| connectionId | Yes | SSH connection ID |