sftp_list_directory
Lists files and directories on a remote host via SFTP, supporting optional glob pattern filtering.
Instructions
[SSH Operations] List files and directories on remote host via SFTP
Example usage:
{
"connectionId": "raspberry-pi",
"remotePath": "/home/pi",
"pattern": "*.txt"
}Security: Remote path must be absolute. Pattern supports glob wildcards.
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_list_directory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | No | Optional glob pattern to filter files (e.g., "*.txt") | |
| remotePath | Yes | Absolute path to remote directory | |
| connectionId | Yes | ID of the SSH connection to use |