fs_read
Read a file on the machine, exactly as stored: text as text, anything else as base64. Up to 256 KiB per call by default (max_bytes up to 4 MiB); truncated says there is more, read on with offset. Paths holding keys and credentials (~/.ssh, ~/.aws, cmdop’s own folder and the like) 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 |
|---|---|---|---|
max_bytes | integer | no | Read at most this many bytes (default 262144, at most 4194304). |
offset | integer | no | Start at this byte (default 0). |
path | string | yes | File on the machine. Absolute, or relative to the user’s home folder; ~ is the home. |
Result
| Name | Type | Required | Meaning |
|---|---|---|---|
data | string | yes | |
encoding | `“utf8” | “base64”` | yes |
offset | integer | yes | |
path | string | yes | The file, resolved to an absolute path. |
size | integer | yes | The file’s whole size in bytes. |
truncated | boolean | yes | The file goes on after what was returned; read again with a larger offset. |
Examples
MCP
{
"name": "fs_read",
"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.