Read File
read_fileRead the full contents of a file. Text files are returned as UTF-8 text; binary files are automatically detected and returned as base64.
Instructions
Read the full contents of a file. Text files are returned as UTF-8 text; binary files are detected automatically and returned as base64.
Args:
path (string): Absolute or relative path to the file.
Returns: file contents as text, or a note that the file is binary with base64 content.
Error Handling:
Returns an error if the path is outside allowed directories or matches a blocked pattern (e.g. .ssh, .aws).
Returns "File or directory not found" if the path does not exist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the file to read |