run_command
Execute shell commands in the active VS Code workspace, including Remote-SSH and WSL, and move long-running commands to background tasks when they exceed the wait threshold.
Instructions
Execute a shell command in the active VS Code workspace (Local shell or Remote Shell Integration / SSH on Remote-SSH/WSL windows). Commands exceeding WaitMsBeforeAsync continue as background tasks.
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": {
"CommandLine": "<CommandLine>",
"toolSummary": "<toolSummary>",
"WaitMsBeforeAsync": "<WaitMsBeforeAsync>"
},
"name": "run_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Cwd | No | Optional working directory (defaults to active VS Code workspace folder). | |
| IsDaemon | No | Set to true for long-running background servers or watchers. | |
| CommandLine | Yes | The exact command line string to execute. | |
| toolSummary | Yes | Brief 2-5 word noun phrase describing the command task. | |
| TargetWindow | No | Optional routing target: "auto" (default), "local", "remote", or VS Code window PID. | |
| WaitMsBeforeAsync | Yes | Milliseconds to wait before backgrounding (500 to 10000). |