run-command
Execute shell commands on virtual machines, targeting local or cloud fleets with configurable environment, workdir, and timeout. Returns the guest's exit code.
Instructions
Run a command in a running machine. exitCode comes from the guest; a failing command is not an error.
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": {
"name": "<name>",
"command": "<command>"
},
"name": "run-command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Environment variables | |
| name | Yes | Machine name | |
| stdin | No | ||
| target | No | Which fleet to talk to. local is smolvm serve on this host; cloud is smol cloud at SMOL_CLOUD_URL. | local |
| command | Yes | argv array, or a string run with sh -c | |
| workdir | No | ||
| timeoutSecs | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stderr | Yes | ||
| stdout | Yes | ||
| exitCode | Yes | ||
| timedOut | Yes | ||
| truncated | Yes |