Run a short remote command
ssh_execRun non-interactive commands on a remote SSH host and return stdout, stderr, and the exit code, with explicit timeout and truncation reporting.
Instructions
Runs a non-interactive command on the remote host (no PTY, no stdin) and returns stdout/stderr/exit code. The command has the full shell privileges of that SSH account and may cause any remote side effect; the server does not block commands by keyword. Output is byte-capped; timeouts and truncation are reported explicitly. Use ssh_exec_start for long-running work.
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": {
"connectionId": "<connectionId>",
"command": "<command>"
},
"name": "ssh_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Command text passed verbatim to the remote shell | |
| timeoutMs | No | ||
| connectionId | Yes | ||
| outputFormat | No | text puts content in text, structured puts it in structuredContent, both keeps the legacy shape | text |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| signal | Yes | ||
| stderr | No | ||
| stdout | No | ||
| exitCode | Yes | ||
| timedOut | Yes | ||
| truncated | Yes | ||
| durationMs | Yes | ||
| stderrBytes | Yes | ||
| stdoutBytes | Yes |