wsl_run
Execute shell commands inside a specified WSL distro and capture stdout, stderr, and exit code. Run as a chosen Linux user, set a working directory, or limit timeout to get reliable command results.
Instructions
Run a shell command inside a WSL distro and capture stdout/stderr/exit code.
Args: params (WslRunInput): distro, command, optional user, cwd and timeout.
Returns: str: JSON {"ok": true, "distro": "...", "returncode": N, "stdout": "...", "stderr": "..."}.
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": {
"params": "<params>"
},
"name": "wsl_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |