Run a command in the sandbox
brij_sandbox_execFree over MCP (the x402 price quoted below applies to the HTTP API only; MCP calls are rate-limited instead). Long jobs: background: true, then brij_sandbox_logs.
Run a shell command in your sandbox
Free (the lease is paid). Runs cmd with bash in /workspace. Foreground: up to 60 s, answers stdout (≤1 MiB), stderr (≤256 KiB), exit_code; past the timeout: exit_code 124, timed_out. background: true starts it detached (up to the lease's end) and answers process_id + log: read it with POST /sandbox/logs. Multi-line scripts and heredocs are fine.
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": {
"cmd": "<cmd>",
"lease_token": "<lease_token>"
},
"name": "brij_sandbox_exec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cmd | Yes | Shell command(s), ≤64 KiB. | |
| timeout_s | No | Foreground ≤60 (default 30); background ≤ the lease's remaining time. | |
| background | No | Run detached; poll POST /sandbox/logs. | |
| lease_token | Yes | The lease_token returned by POST /sandbox/start (shown once). Also accepted as Authorization: Bearer. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | The sandbox answered. | |
| log | No | Detached command's log path, for /sandbox/logs. | |
| stderr | No | Standard error, ≤256 KiB. | |
| stdout | No | Standard output, ≤1 MiB. | |
| exit_code | No | The command's exit code (124: timed out). | |
| timed_out | No | True when the foreground limit cut it. | |
| background | No | True for a detached command. | |
| process_id | No | Detached command's id, for /sandbox/logs. | |
| duration_ms | No | Run time. |