Skip to main content
Glama

terminal_read

Read recent terminal output from a network device to inspect the current prompt, command results, interactive prompts, paging state, or errors.

Instructions

Capture recent terminal output for a device, so the caller can inspect the current prompt, command output, a password/interactive prompt, paging state, or unexpected errors. lines limits how much recent scrollback is returned (default 100); the underlying tmux session retains a much larger history buffer. The device must still be present in the active topology, reloaded from disk on every call -- an already-open session does not stay readable if the active topology changes to no longer include this device.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linesNo
deviceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It explicitly states that the device must be present in the active topology, that sessions are reloaded from disk on every call, and that an open session becomes unreadable if the topology changes. This is significant behavioral context that helps the agent avoid stale-state mistakes. However, it does not mention what happens if the device is not present (error type), nor whether this operation has side effects (it appears read-only, but not explicitly stated). Thus a 4, not 5.

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

Conciseness4/5

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

The description is concise but packs significant information. It opens with a clear purpose statement, then details the 'lines' parameter, and ends with a critical caveat about topology. The sentences are purposeful and front-load the most important info. The caveat is placed at the end, which is acceptable. No filler. A 4 because it is slightly long and could be more concise, but each sentence earns its place.

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?

Given the tool's complexity (a read operation on a terminal session with a topology dependency), the description covers the key usage and behavioral aspects. It doesn't have an output schema, so it doesn't explain the return format, but that might be inferable. The description is complete enough for an agent to call it correctly: it knows the tool reads output, the 'lines' limit, and the topology dependency. The only missing piece is what happens when the device is absent, which could be inferred as an error. Thus a 4.

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?

The schema has 0% description coverage (no parameter descriptions in the schema), so the description must compensate. It explains the 'lines' parameter: 'limits how much recent scrollback is returned (default 100)'. It does not explain 'device' beyond the tool's purpose, but the purpose makes it clear that 'device' identifies which device's output to capture. This adds some meaning beyond the schema's raw type and default, but not exhaustive – e.g., no information about acceptable formats for device IDs. Thus a 3.

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

Purpose5/5

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

The description clearly states the tool's purpose: capturing recent terminal output for a device, and explicitly enumerates the kinds of output it can capture (prompt, command output, interactive prompts, paging, errors). This distinguishes it from sibling tools like terminal_send (which sends input) and terminal_open (which opens a session). The verb 'Capture' is specific and the resource is 'terminal output'.

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?

The description provides explicit guidance on when to use the tool: to inspect terminal output for a device during interactive sessions or after commands. It also gives a crucial exclusion: the device must be in the active topology, and the session does not remain readable if topology changes. This helps the agent choose this tool over alternatives like terminal_list (which lists sessions) and terminal_open (which creates a session).

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