read_file
Read a text file's contents with pagination support via offset and length. Enables efficient chunked reading while enforcing directory access security.
Instructions
Read a text file and return its contents, with optional pagination.
Pagination via offset and length allows reading large files in chunks without loading everything into the LLM context. The security sandbox is enforced: the path must be inside an allowed directory.
Returns the file text. Raises PermissionError or FileNotFoundError on error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the file to read. | |
| offset | No | Line number to start reading from (0-based). Default 0. | |
| length | No | Maximum number of lines to read. 0 means use configured limit. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |