Skip to main content
Glama

Read Session Output

read_session_output

Retrieve new output from a PTY session, optionally including all prior output. Use it to monitor command results and capture terminal responses between reads.

Instructions

Read output from a PTY session.

Returns only new output since the last read unless all_output=True.

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": {
      "session_id": "<session_id>"
    },
    "name": "read_session_output"
  }
}

Input Schema

NameRequiredDescriptionDefault
all_outputNo
session_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the genuinely non-obvious cursor semantics: reads return only new output unless all_output=True, which warns the agent that repeated calls consume output. It omits important traits such as whether the call blocks waiting for output, what happens when no new output exists, and buffer or session-invalid failure modes.

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?

Two short sentences, zero filler, with the core action stated first and the non-default behavior immediately after. Nothing could be cut without losing information.

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

Completeness4/5

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

An output schema exists, so return shape needs no explanation, and for a two-parameter read tool the description covers the essential semantics. The remaining gap is operational behavior (blocking, empty-read handling) that an agent would need before looping on this call.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It fully explains all_output (default false, flips to full history) but says nothing about session_id beyond its presence in the schema, leaving 1 of 2 parameters without added meaning.

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?

States a specific verb and resource ("Read output from a PTY session") and the PTY qualifier separates it from the file-reading siblings like read_file_text and read_log_file. It stops short of naming an alternative explicitly, so an agent must infer the PTY-vs-file distinction itself.

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

Usage Guidelines3/5

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

Usage is only implied: the session_id requirement plus the PTY framing suggests this follows start_shell_session/write_to_session, but the description never says when to pick this over read_file_text or what prerequisites exist. The all_output clause is behavioral guidance rather than tool-selection guidance.

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

Deploy Server

Other Tools