List a remote directory
sftp_listLists remote directory entries sorted by name with type, size, mtime, and permissions, paging large folders via cursor and never returning file contents.
Instructions
Lists remote directory entries sorted by name, with name, type, size, mtime and permission string; file contents are never returned. Large directories are paged with nextCursor; cursors are valid only in this process and are not a consistent snapshot under concurrent changes.
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | ||
| pageSize | No | ||
| remotePath | Yes | ||
| connectionId | Yes | ||
| remotePathStyle | No | Use windows when the remote is Windows OpenSSH; accepts a full drive path or a plain relative path | posix |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entries | Yes | ||
| pageSize | Yes | ||
| truncated | Yes | ||
| nextCursor | Yes | ||
| remotePath | Yes | ||
| totalEntries | Yes |