Skip to main content
Glama

read_output

Retrieve the last N lines of output from a specific iTerm2 session using its session ID, so agents can inspect recent terminal activity.

Instructions

Read the last N lines of output from a specific iTerm2 session by its session ID.

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_output"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesNoNumber of lines to return from the end (default: 100)
session_idYesThe unique session ID (UUID) from list_sessions

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does convey tail semantics ('last N lines ... from the end'), implying older output is excluded rather than destroyed, but says nothing about error behavior for invalid session IDs, output truncation/format, or whether the call blocks waiting for output.

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?

A single front-loaded sentence with no filler; the resource, scope, qualifier (last N), and identifier (session ID) all appear immediately. Nothing could be removed without losing meaning.

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?

For a simple two-parameter read tool with no annotations and no output schema, the description covers what is read and from where, which is nearly sufficient. Minor omissions are what the returned text looks like (raw lines vs. structured) and behavior on an unknown session ID.

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 100%, with both parameters documented including the default of 100 lines and the note that the UUID comes from list_sessions. The description restates the same semantics without adding format, bounds, or behavior detail beyond the schema, so the baseline 3 applies.

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 gives a specific verb and resource ('Read the last N lines of output') and scopes it to a specific iTerm2 session by session ID, which cleanly separates it from siblings like write_input and list_sessions. It stops short of explicitly naming an alternative tool, which keeps it just under a 5.

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 implied: an agent would use this when it needs to inspect recent terminal output from a known session. There is no explicit when-to-use/when-not guidance and no pointer to alternatives such as list_sessions for discovering IDs, leaving the agent to infer the workflow.

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