Run a command on a host
jms_ssh_runRuns a single shell command on a host behind a bastion and returns its output and real exit code, reusing one per-host connection so you pass a host, not a session.
Instructions
Run one shell command on a host behind the bastion; returns its output and real exit code. The connection is opened, reused and re-entered internally — pass a host, never a session. Very long output is cut to head+tail (truncated: true), so narrow log reads with tail -n / journalctl -n / grep. Any spelling of the same asset (id, IP, hostname) reuses one connection.
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": {
"host": "<host>",
"command": "<command>"
},
"name": "jms_ssh_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | Asset id, IP or hostname | |
| account | No | System user on the asset (e.g. root). Given, it logs in directly as "<login>@<account>@<host>" and skips the bastion menu; omit to pick through the menu | |
| command | Yes | Shell command, run as one line | |
| maxBytes | No | Output cap for this call | |
| timeoutMs | No | Default from JMS_SSH_COMMAND_TIMEOUT_MS |