ssh_run
Execute a preset's named SSH command with typed, validated parameters; credentials stay in the OS keychain, and each call is approval-gated and audit-logged.
Instructions
Run one of an SSH preset's named commands. You supply command
(a name the preset declares; list_presets shows each command,
what it does and its parameters) and params (values by name).
The command line is FIXED in the preset: each value fills one
placeholder, checked by its type (a string or path against a
pattern, an int within a range, an enum from a list) BEFORE any
credential is read. Values are single words without spaces or shell
syntax and may not start with -. Returns stdout, stderr and
exit_code. Host key verified against known_hosts. The approval
prompt shows the full command. If the user previously approved a
time-boxed window for this command, the call proceeds without a new
prompt and is recorded as 'windowed' in the audit log. Every call is
recorded to the audit log.
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": {
"preset_name": "<preset_name>",
"command": "<command>"
},
"name": "ssh_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | The command's parameters by name, e.g. {"lines": 50}. | |
| command | Yes | One of the preset's named commands; `list_presets` shows them. | |
| preset_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notice | No | Set when mcp-warden stopped reading the output (over the limit). | |
| stderr | Yes | ||
| stdout | Yes | ||
| exit_code | No |