Built-in tools
builtin__read_file
Reads a text file's content from its ref, with no model call.
Behavior
- Takes a ref to a text file: JSON, CSS, HTML, Markdown, CSV, YAML, XML, plain text and other
text/*types. - Returns
{ref, mime, bytes, text}, plusjsonwhen the whole text parses as JSON. - A file longer than
max_bytes(default 1 MB) is cut on a character boundary and returned withtruncated: true. - Images, PDFs and other binary files are refused. Models see those when their ref appears in what they read; tools get them through a
format: blobinput.
When to use it
- Read back a file saved with
builtin__save_file, such as a backup to restore:{{read.json.customCss}}. - Use a text file a tool returned in a later step's input.
| Available to | Effect |
|---|---|
| Any agent or plan step | Read-only |
Input
max_bytesinteger
Most bytes to return; default 1048576
A file ref such as blob:sha256-….json
Output
bytesinteger
jsonany
mimestring
refstring
textstring
truncatedboolean
- id: E1
tool_name: builtin__read_file
input:
ref: "{{input.ref}}"