run_command
Run a shell command non-interactively on a session's host and get its exit status, stdout and stderr. Use for non-interactive commands only; use send_input for interactive programs.
Instructions
Run a shell command on the session's host and get its exit status, stdout and stderr. It runs non-interactively, beside the terminal (not typed into it); the person sees it in the session's tab. Don't run commands that wait for input; use send_input for interactive programs.
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 |
|---|---|---|---|
| host | No | The host, when you don't name a session. | |
| command | Yes | A shell command. It runs in a fresh shell in the home directory: `cd` does not carry over to the next command. | |
| session_id | No | The session to run it in (its host). Or give `host` and a session of yours there is used, or opened. | |
| timeout_secs | No | Give up after this many seconds (default 60, at most 3600). |