Read a command's stored output
get_command_logsRead a command's stored stdout or stderr from a byte offset in 1 MiB chunks and continue with nextOffset until done, including while the sandbox is stopped.
Instructions
Read a command's stored output. Reads stdout or stderr from a byte offset, at most 1 MiB per call. Read on with nextOffset until done. A running detached command gains output every 30 s; a streamed one every 2 s. Works while the sandbox is stopped.
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": {
"sandboxId": "<sandboxId>",
"commandId": "<commandId>"
},
"name": "get_command_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No | ||
| stream | No | stdout | |
| encoding | No | base64 returns the exact bytes. utf8 can split a character at the edge of a read. | utf8 |
| commandId | Yes | ||
| sandboxId | Yes | Public Sandbox id returned by create/list/get sandbox calls. |