Skip to Content
Levain LabsLevain Labs

read_version_file

Read one file from a version's recipe source, whole or in parts. ``offset`` is the 1-based line to start at and ``limit`` the number of lines to read. With…

Read one file from a version's recipe source, whole or in parts.

offset is the 1-based line to start at and limit the number of lines to read. With neither, a file that fits in one reply comes back whole as {path, content}. Otherwise the reply holds whole lines up to about 50,000 characters of serialized JSON, so it fits one tool result, and adds start_line, end_line, total_lines, total_chars and truncated; when truncated is true, read on from end_line + 1. A single line too long for one reply is cut to fit and counted as end_line; the rest of that line is not returned by this tool, including on a later call. list_version_files gives each file's size before reading.

Parameters

NameTypeRequiredDescription
agent_idstringyes
versionintegeryes
pathstringyes
offsetintegerno
limitintegerno

On this page