Docs

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 read call in the timeline and run it again with Rerun.

Parameters

ParameterTypeDetails
path required
Path
stringFile to read, relative to the workspace.
end_line
End line
integerLast line to return, inclusive; must not be smaller than start_line. Without it a read returns 2,000 lines. Ignored for images.
start_line
Start line
integerFirst line to return, 1-based. Ignored for images.
Default 1

Edit this page on GitHub