run_command
Execute a shell command on a remote server over SSH in an already-open session, with access-policy checks and automatic secret masking on the returned output.
Instructions
Runs one shell command on a remote server over SSH, through an already-open session (see open_session). The command is checked against this host's access policy before it runs: it may execute immediately, be denied outright (POLICY_DENIED), be rejected because it needs a terminal (INTERACTIVE_COMMAND — the error message gives you a batch-mode command to retry with instead), or pause while the user is asked to approve it. cd and environment persist across calls on the same session; the response always reports the resulting working directory. stdout/stderr are scanned and secrets are masked as [REDACTED:type] before being returned. A command still running when the timeout runs out comes back with timedOut: true. Output that is not valid UTF-8 comes back lossy with binary: true; pipe it through base64 or xxd to read the bytes. Pass a one-line description of what the command does and why: the user sees it when asked to approve.
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": {
"sessionId": "<sessionId>",
"command": "<command>"
},
"name": "run_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The full shell command to run, exactly as it should be typed at a prompt. Runs in the session's current working directory; use `cd` within the command to change it. | |
| sessionId | Yes | The sessionId returned by open_session. | |
| description | No | One short sentence for the user: what this does and why. Shown in the approval window next to the exact command, which is what the user judges; it does not change what is allowed. Recommended for chained or long commands. | |
| timeoutSeconds | No | How long to wait for the command before attempting recovery (Ctrl-C, then reopening the shell if that does not work). Defaults to the timeout set in ShellVibe's settings (60 unless changed); clamped to a maximum of 600. |