Read a text file
read_fileRead text files from allowed directories such as home, shared storage, or Termux tmp, with line offsets and numbering; use base64 encoding for binary files.
Instructions
Read a file from an allowed directory (home, shared storage or Termux tmp) as text. Supports line offsets and line numbering. Binary files must be read with encoding="base64". Large reads are limited by security.maxReadBytes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path or path relative to $HOME. | |
| limit | No | Maximum number of lines to return. Default 2000. | |
| offset | No | First line to return (1-based). Default 1. | |
| encoding | No | Buffer encoding, e.g. utf8, latin1, base64. Default utf8. | |
| with_line_numbers | No | Prefix every line with its line number. |