read_text_file
Read UTF-8 text file contents securely, optionally within a specified line range. Ensures access only within allowed directories and handles 1-indexed line numbers for precise extraction.
Instructions
Read the contents of a UTF-8 text file, optionally within a line range.
Args: path (str): File path to read (absolute or relative to allowed directories) fromLine (int, optional): Starting line number (1-indexed, inclusive) toLine (int, optional): Ending line number (1-indexed, inclusive)
Returns: str: File contents as text, or error message if failed
Note:
Input Schema
Name | Required | Description | Default |
---|---|---|---|
fromLine | No | ||
path | Yes | ||
toLine | No |