|
| 1 | +# Full parameter matrix |
| 2 | + |
| 3 | +Every action-scoped argument is optional at the schema level; each dispatcher enforces its own per-action required set and returns a structured failure naming any missing argument. The "needs" column lists what a call actually requires. |
| 4 | + |
| 5 | +Common to every tool: `format` (`compact`|`json`|`markdown`, default `compact`), and where noted `raw` (disable truncation) and `preview` (dry-run). |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## ssh_run — run commands |
| 10 | + |
| 11 | +| action | needs | optional | |
| 12 | +|---|---|---| |
| 13 | +| `exec` | `server`, `command` | `cwd`, `timeout`, `raw`, `format` | |
| 14 | +| `sudo` | `server`, `command` | `cwd`, `sudo_password`, `timeout`, `raw`, `format` | |
| 15 | +| `script` | `server`, `commands[]` | `isolate` (separate shells, no shared cd/env), `raw`, `format` | |
| 16 | +| `fleet` | `group` (no `server`), `command` | `cwd`, `format` | |
| 17 | +| `detach` | `server`, `command` | returns a `job_id` | |
| 18 | +| `job-status` | `server`, `job_id` | `since_offset` (incremental output; pass back prior `log_size`) | |
| 19 | +| `job-kill` | `server`, `job_id` | | |
| 20 | + |
| 21 | +`script` segments are `;`-sequenced — a failing segment does NOT abort the rest; returns a per-segment exit-code table. `isolate: true` runs each segment in its own shell (no shared cd/env). `job-status` returns `state` (running/done) + `exit_code` + `log_size`; feed the prior `log_size` back as `since_offset` for incremental output. Default `timeout`: `exec` 120000 ms, `sudo` 30000 ms. |
| 22 | + |
| 23 | +## ssh_find — search files |
| 24 | + |
| 25 | +| action | needs | optional | |
| 26 | +|---|---|---| |
| 27 | +| `grep` | `server`, `path`, `pattern` | `context_lines`, `match_cap`, `timeout_secs`, `cross_mounts`, `allow_root`, `format` | |
| 28 | +| `locate` | `server`, `path`, `name` (glob) | `match_cap`, `timeout_secs`, `cross_mounts`, `allow_root`, `format` | |
| 29 | +| `ls` | `server`, `path` | `format` | |
| 30 | + |
| 31 | +Prunes `/proc /sys /dev` and `.git`; server-side timeout + match cap stop the walk early. **`match_cap` defaults to 200** (raise it for exhaustive sweeps or results truncate silently). `allow_root: true` is required only to search a bare `/`; normal paths need nothing. |
| 32 | + |
| 33 | +## ssh_file — move/edit files |
| 34 | + |
| 35 | +| action | needs | optional | |
| 36 | +|---|---|---| |
| 37 | +| `upload` | `server`, `local_path`, `remote_path` | `format` | |
| 38 | +| `download` | `server`, `local_path`, `remote_path` | `format` | |
| 39 | +| `read` | `server`, `remote_path` | `head`, `tail`, `grep`, `line_start`, `line_end` (1-based, inclusive), `format` | |
| 40 | +| `write` | `server`, `remote_path`, `content` | `format` | |
| 41 | +| `edit` | `server`, `remote_path`, `old_text`, `new_text` | `format` | |
| 42 | +| `diff` | `server`, `path_a`, `path_b` | `server_b` (cross-server diff), `format` | |
| 43 | +| `sync` | `server`, `source`, `destination` (`local:`/`remote:` prefixed) | `exclude[]`, `delete_extra`, `format` | |
| 44 | +| `deploy` | `server`, `artifact_local_path`, `target_path` | `post_hooks[]` (shell-cmd strings, in order), `health_check` (cmd; non-zero=unhealthy), `rollback_on_fail`, `rollback_hook`, `preview`, `format` | |
| 45 | +| `deploy-artifact` | alias of `deploy` (same handler + args) | — | |
| 46 | + |
| 47 | +Deploy order: upload → `post_hooks` → `health_check` → (on `post_hook` or `health_check` failure, if `rollback_on_fail`) restore prior artifact → `rollback_hook`. |
| 48 | + |
| 49 | +## ssh_logs — read logs |
| 50 | + |
| 51 | +| action | needs | optional | |
| 52 | +|---|---|---| |
| 53 | +| `tail` | `server`, `file` | `lines`, `grep`, `format` | |
| 54 | +| `follow-start` | `server`, `file` | `lines`, `grep` → returns `session_id` | |
| 55 | +| `follow-read` | `session_id` | `since_offset` (resume cursor), `format` | |
| 56 | +| `follow-stop` | `session_id` | | |
| 57 | +| `journal` | `server` | `unit`, `since`, `until`, `priority`, `lines`, `grep`, `format` | |
| 58 | + |
| 59 | +`tail`/`follow-start` apply `lines` first, then `grep` (`tail -n N | grep -E`), so a filtered result can have fewer than `lines` rows — raise `lines` when filtering. |
| 60 | + |
| 61 | +## ssh_service — systemd |
| 62 | + |
| 63 | +| action | needs | optional | |
| 64 | +|---|---|---| |
| 65 | +| `status` | `server`, `service` | `format` (returns ActiveState/SubState/recent log) | |
| 66 | +| `start`/`stop`/`restart`/`enable`/`disable` | `server`, `service` | `preview`, `format` | |
| 67 | + |
| 68 | +## ssh_health — health |
| 69 | + |
| 70 | +| action | needs | optional | |
| 71 | +|---|---|---| |
| 72 | +| `check` | `server` | `format` (cpu/mem/disk/process snapshot) | |
| 73 | +| `watch` | `server` | `watch_type` (`overview`|`cpu`|`memory`|`disk`|`network`|`process`), `format` | |
| 74 | +| `procs` | `server` | `proc_action` (`list` default|`kill`|`info`), `pid`, `signal` (`TERM`|`KILL`|`HUP`|`INT`|`QUIT`), `preview`, `format` | |
| 75 | +| `alerts` | `server`, `alert_action` (`set`|`get`|`check`) | `cpu_threshold`, `memory_threshold`, `disk_threshold` (0–100), `enabled`, `format` | |
| 76 | + |
| 77 | +## ssh_db — databases |
| 78 | + |
| 79 | +| action | needs | optional | |
| 80 | +|---|---|---| |
| 81 | +| `query` | `server`, `db_type`, `database`, `query` | `user`, `password`, `format`. **SELECT-only** (Mongo find ok). | |
| 82 | +| `list` | `server`, `db_type` | `database` (list tables/collections), `user`, `password`, `format` | |
| 83 | +| `dump` | `server`, `db_type`, `database` | `output_path` (default `/tmp/<db>-<ts>.sql[.gz]`), `gzip`, `user`, `password`, `format` | |
| 84 | +| `import` | `server`, `db_type`, `database`, `input_path` | `preview`, `user`, `password`, `format` | |
| 85 | + |
| 86 | +`db_type`: `mysql` | `postgresql` | `mongodb`. `query` is SELECT-only (Mongo: find/read only; mutations blocked). `dump`: a *supplied* `output_path` is used verbatim — `gzip` does NOT append `.gz`, add it yourself; an *omitted* `output_path` auto-names `/tmp/<db>-<ts>.sql[.gz]` (auto-name adds `.gz`). |
| 87 | + |
| 88 | +## ssh_backup — backups |
| 89 | + |
| 90 | +| action | needs | optional | |
| 91 | +|---|---|---| |
| 92 | +| `create` | `server`, `backup_type` | `name`, `database`, `paths[]`, `exclude[]`, `backup_dir`, `gzip`, `verify`, `format` | |
| 93 | +| `list` | `server` | `backup_dir`, `format` | |
| 94 | +| `restore` | `server`, `backup_id` | `target_path` (file backups), `verify`, `preview`, `format` | |
| 95 | +| `schedule` | `server`, `backup_type`, `cron` | `name`, `database`, `paths[]`, `retention`, `format` | |
| 96 | + |
| 97 | +`backup_type`: `mysql` | `postgresql` | `mongodb` | `files`. Content-addressed + sha256; restore shows a high-risk preview. |
| 98 | + |
| 99 | +## ssh_docker — Docker |
| 100 | + |
| 101 | +| action | needs | optional | |
| 102 | +|---|---|---| |
| 103 | +| `ps` | `server` | `format` | |
| 104 | +| `logs` | `server`, `container` | `tail_lines`, `format` | |
| 105 | +| `exec` | `server`, `container`, `command` | `format` | |
| 106 | +| `restart` | `server`, `container` | `preview`, `format` | |
| 107 | +| `inspect` | `server`, `container` | `format` | |
| 108 | + |
| 109 | +Container/image names are validated; mutations show a preview. |
| 110 | + |
| 111 | +## ssh_session — persistent shell |
| 112 | + |
| 113 | +| action | needs | optional | |
| 114 | +|---|---|---| |
| 115 | +| `start` | `server` | returns `session_id` | |
| 116 | +| `send` | `session_id`, `command` | `timeout`, `format` | |
| 117 | +| `list` | — | `format` | |
| 118 | +| `close` | `session_id` | | |
| 119 | +| `replay` | `session_id` | `limit`, `format` | |
| 120 | +| `memory` | `session_id` | `format` (inferred-state snapshot: cwd/env/exit) | |
| 121 | + |
| 122 | +## ssh_net — tunnels + port probes |
| 123 | + |
| 124 | +| action | needs | optional | |
| 125 | +|---|---|---| |
| 126 | +| `tunnel-open` | `server`, `tunnel_type` (`local`|`remote`|`dynamic`) | `bind`, `local_port`, `remote_host`, `remote_port`, `preview`, `format` | |
| 127 | +| `tunnel-list` | — | `format` | |
| 128 | +| `tunnel-close` | `tunnel_id` | | |
| 129 | +| `port-test` | `server`, `target_host`, `target_port` | `probe_chain[]` (`dns`/`tcp`/`tls`/`http`), `timeout_ms_per_probe`, `continue_on_fail`, `format` | |
| 130 | + |
| 131 | +## ssh_fleet — fleet + config metadata |
| 132 | + |
| 133 | +`action` selects the entity; `op` selects the sub-operation (default `list`/`status`). |
| 134 | + |
| 135 | +| action | op values | key params | |
| 136 | +|---|---|---| |
| 137 | +| `servers` | list | — | |
| 138 | +| `groups` | list, add, remove, update | `name`, `members[]`, `description` | |
| 139 | +| `aliases` | list, add, remove | `name`, `target` | |
| 140 | +| `command_alias` | list, add, remove, suggest | `alias`, `command` (or search term for `suggest`) | |
| 141 | +| `profiles` | list, show, update | `name` | |
| 142 | +| `hooks` | list, update | `name` | |
| 143 | +| `keys` | list, add, verify, accept, show | `server`, `host`, `port` | |
| 144 | +| `history` | list | `limit`, `search` | |
| 145 | +| `connections` | status, reconnect, disconnect, cleanup | `server` | |
| 146 | + |
| 147 | +## ssh_plan — multi-step plan |
| 148 | + |
| 149 | +| action | needs | optional | |
| 150 | +|---|---|---| |
| 151 | +| `run` | `steps[]` (ordered step objects; each dispatches to another tool) | `server` (plan default), `rollback_on_fail`, `format` | |
| 152 | +| `approve` | `steps[]`, `approve_token` (any non-empty) | `server`, `rollback_on_fail`, `format` | |
| 153 | + |
| 154 | +High-risk steps gate behind `approve`. Each step returns its own structured result; `rollback_on_fail` walks completed steps in reverse on failure. |
0 commit comments