List a directory in WSL
wsl_list_dirList files in a WSL distro directory with type, permissions, size, and modification time. Returns structured output for read-only profiles, avoiding raw ls -la commands.
Instructions
List a directory in the distro, with type, permissions, size and mtime. Cheaper and more structured than running 'ls -la' through wsl_exec, and it works on a read-only profile.
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": "wsl_list_dir"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute directory path in the distro. When WSL_ALLOWED_PATHS is set, only paths inside it are accepted. | |
| session | No | Session id from wsl_connect. Optional — the file tools do not depend on a session's working directory, paths are absolute. |