session_read
Read output from a terminal session, using stream, snapshot, or diff modes to capture only changed lines or full output with auto-detection of TUI applications.
Instructions
Read output from a session. Mode 'auto' (default) auto-detects TUI applications and switches between stream and snapshot. 'diff' returns only changed screen lines.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Read mode: 'auto' (default, auto-selects stream/snapshot), 'stream', 'snapshot', or 'diff' | auto |
| timeout | No | Settle timeout in seconds (stream mode) | |
| scrollback | No | Lines of scrollback history to include (snapshot mode only) | |
| session_id | Yes | Session ID returned by session_create | |
| strip_ansi | No | Strip ANSI escape sequences from output | |
| truncation | No | Truncation mode: 'tail' (keep beginning), 'head_tail' (keep beginning+end), 'tail_only' (keep end), 'none' (no truncation) |