list_directory
Lists contents of any directory in WSL filesystem, showing file names, types, permissions, sizes, and modification times.
Instructions
List the contents of a directory in the WSL filesystem. Returns each entry with its name, type (file, directory, symlink), Unix permissions, size in bytes, and last-modified timestamp. Equivalent to running ls -la in the target directory.
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": "list_directory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the directory to list within the WSL filesystem, e.g. '/home/user' or '/var/log'. | |
| distro | No | Name of the WSL distribution. Defaults to the system default distribution. |