Run command
run_commandExecutes a bash command as the server user, defaults to the project directory, and returns exit code, status, duration, and separate stdout/stderr; long-running commands can run in the background.
Instructions
Run a bash command on this machine as the user who runs the server (that user's rights). Depending on the owner's permission settings a command may wait for approval in the tray or be refused. Default cwd is the project dir. Returns exit_code, status, duration_ms and separate stdout/stderr sections. Output is capped at maxOutputBytes (default 30 KB, head+tail kept, truncation is always reported; a truncated result includes a job_id, and job_output pages the full text). Set wait= to run long commands in background: you get a job_id immediately and poll it with job_status/job_output. Pass a unique requestId to make retries safe (a repeated requestId returns the cached result instead of running again).
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": "run_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| note | No | Short human-readable explanation (1 line, in the user's language) of what you are about to do and why. Shown to the user on the approval card. Always provide when calling mutating tools. | |
| wait | No | ||
| agent | No | Short consistent identifier or display name of this agent (e.g. 'Claude · Лендинг', 'Тесты', 'Мой агент'). Used to separate tasks and route tray messages when multiple agents work in parallel. | |
| command | Yes | ||
| requestId | No | ||
| timeoutMs | No | ||
| maxOutputBytes | No |