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

Parameters

ParameterTypeDetails
path required
Path
string—
end_line
End line
integerText files only; inclusive.
start_line
Start line
integerText files only; 1-based.
Default 1