Read part of a file
nas_file_readRead bytes from any file on your UGREEN NAS directly in memory, without downloading it. Returns UTF-8 text or base64 content in chunks so you can inspect or stream files by offset.
Instructions
Read bytes from a file on the NAS without saving it locally. Returns { path, offset, bytes, encoding, content }: encoding is "utf8" when the bytes are valid UTF-8 text, otherwise "base64". By default the first 64 KiB are read and at most 1 MiB per call; for a longer file call again with offset increased by the bytes already read. A result with fewer bytes than requested means the end of the file was reached. To copy a whole file to this computer use nas_file_download.
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": {
"path": "<path>"
},
"name": "nas_file_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File to read. Absolute NAS path, for example /volume1/docs/report.pdf. | |
| length | No | Number of bytes to read (max 1048576). | |
| offset | No | Byte offset to start reading at. |