read_file
A built-in file reading tool in CodeSmith that supports paginated reading, line number display, and byte limits. Its precise description guides the model to prefer this tool over shell commands for reading files.
Timeline (last 90 days)
The path-bearing tools inspected include read_text_file, read_file, read_media_file, get_file_info, and read_multiple_files, whose argument is a paths array.
read_file's pagination constants are set as: default 200 lines, hard cap 500 lines, visible bytes 16KB.
For small files (≤200 lines and ≤16KB and no explicit range), read_file takes a fast path and returns them as-is without wrapping, to preserve historical behavior.
The description of the read_file tool in CodeSmith explicitly recommends that users use read_file instead of cat, head, tail or sed -n in exec_shell, on the grounds that it is faster, sandbox-aware and skips approval prompts.
When read_file's start_line exceeds the total line count, it returns the `[NO CONTENT]` sentinel rather than throwing an error.
read_file's truncation notice directly outputs the parameters for the next call: `To continue, call read_file with path="..." start_line=N max_lines=M`, and the model can copy it to continue.
When read_file outputs large files, it uses the line-number format `{line_no:>6}│ {line}`, i.e. six columns right-aligned plus one full-width vertical bar.
All Facts (7)
The path-bearing tools inspected include read_text_file, read_file, read_media_file, get_file_info, and read_multiple_files, whose argument is a paths array.
50%Unverifiedread_file's pagination constants are set as: default 200 lines, hard cap 500 lines, visible bytes 16KB.
50%UnverifiedFor small files (≤200 lines and ≤16KB and no explicit range), read_file takes a fast path and returns them as-is without wrapping, to preserve historical behavior.
50%UnverifiedThe description of the read_file tool in CodeSmith explicitly recommends that users use read_file instead of cat, head, tail or sed -n in exec_shell, on the grounds that it is faster, sandbox-aware and skips approval prompts.
50%UnverifiedWhen read_file's start_line exceeds the total line count, it returns the `[NO CONTENT]` sentinel rather than throwing an error.
50%Unverifiedread_file's truncation notice directly outputs the parameters for the next call: `To continue, call read_file with path="..." start_line=N max_lines=M`, and the model can copy it to continue.
50%UnverifiedWhen read_file outputs large files, it uses the line-number format `{line_no:>6}│ {line}`, i.e. six columns right-aligned plus one full-width vertical bar.
50%