Run command
execRuns a shell command on a running Hadronbox machine and returns exit code, stdout, and stderr, with timeout and output limits for controlled remote execution.
Instructions
Run a shell command line in a running machine and return its exit code, stdout and stderr. Project files live under /workspace (start with "cd /workspace && ..."). Long output is shortened in the middle. The command is stopped when timeout_seconds passes. No stdin; for multi-line programs write a script with write_file first.
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": {
"machine_id": "<machine_id>",
"command": "<command>"
},
"name": "exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Shell command, e.g. "npm test". | |
| machine_id | Yes | Machine id (machine_id from create_machine or list_machines). | |
| timeout_seconds | No | Stop the command after this many seconds (default 120, max 3600). | |
| max_output_chars | No | Keep at most this many characters of stdout and of stderr (default 20000). |