agent_read_file
Read text file contents with line offset, limit, and encoding options. Returns JSON with path, total lines, truncated flag, and content.
Instructions
Read the contents of a text file.
Returns a JSON object with the file path, requested offset/limit, and the lines that were read. Large files are capped at MAX_FILE_SIZE bytes.
Args: path: Absolute or relative path to the file. offset: Number of lines to skip from the beginning. limit: Maximum number of lines to return (null = unlimited). encoding: Text encoding to use.
Returns: str: JSON string with keys 'success', 'path', 'offset', 'limit', 'total_lines', 'truncated', and 'content'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute or relative path to the file to read. | |
| limit | No | Maximum number of lines to return (null = unlimited). | |
| offset | No | Number of lines to skip from the beginning. | |
| encoding | No | Text encoding to use when reading the file. | utf-8 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |