Read background task output
task_outputRead a background task's log by tail or byte offset, optionally wait for new output or exit, and return next_offset for cheap incremental polling.
Instructions
Read a task log, either the last N lines (default) or an incremental byte range via offset. Use wait_ms to wait for new output. The result includes next_offset for cheap incremental polling.
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": {
"id": "<id>"
},
"name": "task_output"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Task id returned by task_start. | |
| offset | No | Byte offset to read from. Omit to read the tail. | |
| wait_ms | No | Wait for new output or task exit. Default 0. | |
| wait_for | No | With wait_ms: return on new output/exit (any) or only when the task exits. Default any. | |
| tail_lines | No | When reading the tail, number of lines. Default 200. |