cmd_run
Runs non-interactive Windows CMD commands and prevents hangs by closing stdin and killing the process tree when the timeout expires.
Instructions
Run a Windows CMD command without hanging. Uses cmd.exe /c with stdin closed and process tree kill on timeout. Safe for any non-interactive command.
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": {
"command": "<command>"
},
"name": "cmd_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory. Defaults to the server start directory. | |
| command | Yes | The CMD command to run | |
| timeout | No | Timeout in ms. Defaults to 10000. Max 30000. |