Read a file in WSL
wsl_read_fileRead a text file in a WSL distro and return its contents; oversized files are truncated to leading bytes, making large logs safe to inspect.
Instructions
Read a text file in the distro and return its contents. Oversized files come back truncated to their leading bytes rather than failing, so pointing this at a large log is safe. Files that report size 0 but hold content (/proc, /sys) are read in full up to the ceiling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute file path in the distro. | |
| session | No | Session id from wsl_connect. Optional — the file tools do not depend on a session's working directory, paths are absolute. | |
| maxBytes | No | Lowers the read ceiling for this call; it cannot exceed WSL_MAX_READ_BYTES. |