runInTerminal
Run a shell command in a specific terminal, wait for completion, and get exit code and output. Uses terminal name or index, with optional timeout.
Instructions
Execute command and wait for completion. Returns exit code and output. Prefer over runCommand.
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": "runInTerminal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Terminal name (from listTerminals). Uses active if omitted. | |
| show | No | Focus terminal panel while running (default: true) | |
| index | No | Terminal index (0-based) from listTerminals. Used if name omitted. | |
| command | Yes | Shell command to run (no metacharacters or newlines) | |
| timeout | No | Seconds to wait for completion (default: 30, max: 300) |