Run a shell command
run_commandExecute shell commands inside an Alibaba Cloud sandbox and return stdout, stderr, and the exit code; omit sandbox_id to use a temporary sandbox that is removed after the call.
Instructions
Run a shell command inside the sandbox and return stdout, stderr and the exit code. When sandbox_id is omitted a temporary sandbox is created for the call and killed afterwards.
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": {
"command": "<command>"
},
"name": "run_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for the command. | |
| envs | No | Extra environment variables for the command. | |
| command | Yes | Shell command to run, e.g. "ls -la /home/user". | |
| sandbox_id | No | Reuse this sandbox instead of creating a temporary one. | |
| timeout_ms | No | Sandbox TTL and command timeout in milliseconds. |