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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "read_file"
}
}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. |