read_file
Reads text file contents from a WSL Linux distribution using an absolute path. Returns file content as UTF-8 string.
Instructions
Read the contents of a file from the WSL filesystem. Returns the file content as a UTF-8 string. Supports any text file accessible to the default WSL user. For binary files, consider piping through base64 using run_command instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the file within the WSL filesystem, e.g. '/home/user/project/main.py' or '/etc/hosts'. | |
| distro | No | Name of the WSL distribution that contains the file. Defaults to the system default distribution. |