Skip to main content
Glama

Read pane output

read_pane

Read a terminal pane's output as raw bytes, rendered screen, or Claude conversation transcript. Block until output settles, and resume from a cursor to fetch only new output.

Instructions

Read a pane's terminal output. mode:"transcript" (Claude panes only) returns the pane's actual CONVERSATION — the last messages user/assistant turns from the session transcript on disk, joined via the pane's session marker — the reliable way to read a claude pane (TUI screen scrapes are lossy). mode:"screen" returns the RENDERED cell grid (what's actually on screen — no overdraw, spinner spam, or mangled spacing) instead of the raw pty stream. Default "raw". tail limits to the last N lines; strip removes ANSI escape codes from a raw read. waitForIdle BLOCKS until the pane has been output-quiet for settleMs (default 600ms) or timeoutMs (default 30000ms) elapses — the way to read a reply without polling/sleeping. since is a byte cursor (use the cursor from a prior read) that returns only NEW output (raw mode), so you don't re-scrape the whole scrollback each turn. Every read returns the current cursor. A screen read also returns inputLine {text, kind: empty|typed|suggestion} for a Claude-style prompt box (null if none): suggestion is the agent's own faint ghost text that nobody typed — never relay or submit it as someone's input. For continuous streaming, subscribe to the pane's output resource instead.

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": {
      "paneId": "<paneId>"
    },
    "name": "read_pane"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo"transcript" = the claude pane's real conversation tail; "screen" = rendered cell grid; "raw" (default) = pty byte stream
tailNo
sinceNobyte cursor from a prior read's `cursor`; returns only output produced since
stripNo
paneIdYes
messagesNotranscript mode: how many trailing conversation messages to return (default 10)
settleMsNoquiet window that ends a waitForIdle read (default 600ms; raise for slow models)
timeoutMsNomax time to block on waitForIdle before returning what is there (default 30000ms)
waitForIdleNoblock until the pane is output-quiet for settleMs (or timeoutMs)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.13

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and discloses blocking behavior, defaults for settleMs/timeoutMs, cursor semantics, rendered-grid vs raw pty vs transcript behavior, and the risky ghost-suggestion detail. This is unusually complete behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but dense and front-loaded: purpose first, then mode semantics, then parameter/behavior notes. Nearly every clause adds operational guidance; nothing is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter, no-annotation, no-output-schema tool, the description supplies the missing return-shape and blocking semantics, including cursor and inputLine. It is complete enough for an agent to call it correctly without opening schemas.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67%, and the description adds substantial meaning for mode, tail, strip, waitForIdle, settleMs, timeoutMs, and since; it explains the cursor round-trip and transcript message tail. A few schema-documented defaults are left to the schema, but the description compensates well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a clear verb and resource ('Read a pane's terminal output') and uses mode-specific language to show what the tool actually returns. It does not name a sibling such as read_messages, so sibling differentiation is limited, but the tool's own scope is unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly contrasts transcript vs screen vs raw modes, explains when waitForIdle is useful (reading a reply without polling), and when to use `since` vs full reads. It also redirects continuous streaming to the pane output resource.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.