Run a command
rent_execRuns a shell command (/bin/bash -l -c) in a running sandbox and answers when it exits: stdout, stderr, exit_code (null when killed by the timeout), timed_out. timeout_s defaults to 50, so the answer comes back inside common client tool timeouts. For work that runs longer (servers, builds, training), start it with rent_start_process and read its output with rent_get_process_output. Arguments not listed here go to the REST route as they are, which refuses them by name.
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": {
"sandbox_id": "<sandbox_id>",
"cmd": "<cmd>"
},
"name": "rent_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cmd | Yes | Shell command. | |
| cwd | No | ||
| env | No | ||
| user | No | Default `user`. | |
| stdin | No | Written to stdin, then closed. | |
| timeout_s | No | Seconds before the command is killed. Default 50. | |
| sandbox_id | Yes | Sandbox id (`lse_…`) from rent_create_sandbox or rent_list_sandboxes. It names the sandbox for its whole life and keeps answering rent_get_sandbox, with the final state, after it ends. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stderr | Yes | ||
| stdout | Yes | ||
| exit_code | Yes | ||
| timed_out | Yes | ||
| duration_ms | Yes |