Stat a remote path
sftp_statReads remote file or directory metadata over SFTP without reading file contents; optionally follows symbolic links to inspect the target.
Instructions
Reads remote file/directory metadata. Defaults to lstat without following symlinks; set followSymlink=true to read the link target. File contents are never read.
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_stat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| remotePath | Yes | ||
| connectionId | Yes | ||
| followSymlink | No | ||
| 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 |
|---|---|---|---|
| gid | Yes | ||
| uid | Yes | ||
| mode | Yes | ||
| note | No | ||
| size | Yes | ||
| type | Yes | ||
| atime | Yes | ||
| mtime | Yes | ||
| linkTarget | No | ||
| remotePath | Yes | ||
| followedSymlink | Yes |