fs_stat
Facts about one file or folder without reading it: kind, size, change and creation time, permission bits, whether it is writable, a symlink’s target; with hash=true also its SHA-256, for a later fs_write or fs_edit with expect_sha256. Paths holding keys and credentials are refused.
Arguments
Over MCP every tool also takes machine: the machine’s name or id, optional when only one machine is online.
| Name | Type | Required | Meaning |
|---|---|---|---|
hash | boolean | no | Also return the file’s SHA-256 (files up to 64 MiB). Pass it as expect_sha256 to fs_write or fs_edit to refuse a write when the file changed in between. Default: false. |
path | string | yes | File or folder on the machine. Absolute, or relative to the user’s home folder. |
Result
| Name | Type | Required | Meaning |
|---|---|---|---|
created | integer | no | Unix seconds, where the file system keeps it. |
kind | `“file” | “dir” | “symlink” |
link_target | string | no | When path itself is a symlink: where it points. |
mode | string | no | Permission bits in octal, for example 644. |
modified | integer | no | Unix seconds. |
path | string | yes | Resolved absolute path (symlinks followed). |
sha256 | string | no | Lower-case hex, when hash was asked and the path is a file of at most 64 MiB. |
size | integer | yes | Bytes; 0 for folders. |
writable | boolean | yes | Whether the user the machine program runs as may write it. |
Examples
MCP
{
"name": "fs_stat",
"arguments": {
"machine": "<machine>",
"path": "<path>"
}
}Limits
The call times out after 30 s (timed_out). Available since version 0.0.1. A refused or failed call returns one of the error codes.