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. An image (PNG, JPEG, GIF or WebP, recognised by its content, not its extension) is attached for the model to look at.
Limits
- A text file must be UTF-8 and at most 2 MiB. One read returns at most 60 KiB of whole lines and says which line to continue from.
- 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
- Reading a file lets write and edit change it afterwards, even after Mework restarts.
- You can change a recorded
readcall in the timeline and run it again with Rerun.
Parameters
| Parameter | Type | Details |
|---|---|---|
path requiredPath | string | File to read, relative to the workspace. |
end_lineEnd line | integer | Last line to return, inclusive; must not be smaller than start_line. Without it a read returns 2,000 lines. Ignored for images. |
start_lineStart line | integer | First line to return, 1-based. Ignored for images. Default 1 |