run_snippet
Starts a saved snippet on one or more granted hosts, returns a runId immediately, and pauses for user approval before executing the command.
Instructions
Starts a snippet (see list_snippets) on one or more hosts as a one-step run with a 60 second timeout, and returns at once with a runId; the run goes on in ShellVibe. Every call pauses for the user to approve it in a window that shows the command, the hosts and the values: no policy mode or earlier approval skips this. For a quick read on one host, run_command is the lighter tool, and the only one a read only host allows. Every host must be visible to you and already granted (request_host_access first, or you get HOST_ACCESS_REQUIRED), and not read only: a host whose maxMode or grant is readonly refuses with POLICY_DENIED. Pass only non-secret variables, as plain values (letters, digits, spaces and _-.,:/@%+=~^; no shell syntax); a secret variable is typed by the user in the approval window, and passing one is rejected. Required variables that are missing are reported before the user is asked anything. One run at a time: while another is in progress you get RUNBOOK_BUSY. Follow the run with get_runbook_run; stop it with cancel_runbook_run. An approval step in the runbook waits for the user to press Continue in ShellVibe: you cannot continue it.
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": {
"snippetId": "<snippetId>",
"hostIds": "<hostIds>"
},
"name": "run_snippet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hostIds | Yes | The hosts to run it on: ids from list_hosts that you have been granted access to. | |
| strategy | No | "parallel" (default) runs several hosts at once; "rolling" runs one host at a time and stops at the first failure, leaving the rest unstarted: use it for a canary. | |
| snippetId | Yes | The id of the snippet, from list_snippets. | |
| variables | No | Values for the non-secret variables, by name. A variable with a default may be left out. | |
| concurrency | No | With "parallel": how many hosts at once. Defaults to 4. | |
| 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. |