glass_logs
Read captured stdout/stderr logs with a resumable cursor. Return lines accumulated since last call, with optional server-side filtering by stream or substring.
Instructions
Read captured stdout/stderr log lines with a resumable cursor. glass_start captures the app's output from launch; this returns what has accumulated and a cursor to pass back next time, so a loop reads each line once. Returns immediately with whatever is there, including nothing at all — it does not wait, so use glass_wait_for_log when you want to block until a line appears (starting up, finishing work). Filter server-side with stream and contains rather than reading everything and scanning it yourself. The buffer keeps the most recent lines and drops the oldest, so a chatty app can age out lines you never read; the lines are the app's own output and are returned marked as untrusted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Resume point — the `cursor` a previous call returned, to read only what has been logged since. Omit to read from the oldest buffered line. | |
| stream | No | "stdout", "stderr", or "both" (default). | |
| contains | No | Return only lines containing this substring (case-sensitive). Filtering happens server-side, so it narrows what the cap applies to. | |
| max_lines | No | Cap on lines returned (default 200); the returned `cursor` resumes at the first line left unread, so a capped read is not a lost one. |