Built-in tools›Files and search
Read file
read- Group
- Files and search
- Turned on by
- Its own switch on the Tools page of Conversation settings.
- Approval
- Not reviewed: runs without asking, within the limits on this page.
- Profile key
tool.read.description
Reads a text file or an image into the conversation so the model can work with what is in it.
Text comes back as a range of lines. A static image (PNG, JPEG, GIF or WebP, recognised by its content, not its extension) is attached for the model to look at. A model that cannot take images gets an error instead.
Limits
- A text file can be any size. With no
end_linea read returns 2,000 lines; with one, at most 5,001. Either way a read stops at 60 KiB of whole lines and says which line to continue from. - A line too long for one read is cut, with a marker saying how many characters were left out.
- A binary file, recognised by NUL bytes near its start, is refused.
- An image can be up to 32 MiB on this computer, or 5 MiB in a WSL or SSH workspace. It is shrunk to at most 2,000 pixels a side before the model sees it.
Good to know
- UTF-8 and UTF-16 with a byte-order mark are decoded. Any other invalid bytes show as U+FFFD, and the result says so. A file read either way cannot be changed with edit.
- Reading a file lets write and edit change it afterwards, even after Mewrk restarts.
- You can change a recorded
readcall in the timeline and run it again with Rerun.
Parameters
| Parameter | Type | Details |
|---|---|---|
path requiredPath | string | — |
end_lineEnd line | integer | Text files only; inclusive. |
start_lineStart line | integer | Text files only; 1-based. Default 1 |