Skip to main content
Glama

Read Terminal Output

terminal_read
Read-only

Read retained terminal output immediately, or supply a cursor to wait for newer bytes from an active serial or SSH session.

Instructions

Read retained terminal output immediately when cursor is omitted; use terminal_wait to wait for new bytes after a known cursor. For U-Boot entry, use this to inspect evidence and prepare terminal_enter_uboot; let that Host-side tool interrupt the countdown rather than polling and sending keys from the client. Retained prompts alone do not establish current device state.

Input Schema

NameRequiredDescriptionDefault
cursorNoOptional next output cursor; when set, wait for newer output.
encodingNoOutput representation: utf8, hex, or base64.
max_bytesNoMaximum number of output bytes to return.
session_idYesActive Session ID or short reference.
timeout_msNoOptional wait timeout in milliseconds when cursor is supplied; maximum 86400000.

Output Schema

NameRequiredDescriptionDefault
dataYes
nextYes
droppedYes
encodingYes
bytes_readYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already carry the safety profile (readOnlyHint=true, openWorldHint=false), and the description adds genuinely non-obvious semantics: retained output does not prove current device state, and countdown interruption is host-side rather than client-driven. It does not state retention depth or cursor-invalidation behavior, which is why it is not a 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?

Three tightly packed sentences, front-loaded with the immediate-read rule and the terminal_wait alternative. The U-Boot sentence is long but delivers actionable routing guidance rather than filler; minor density cost keeps it from a 5.

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?

With an output schema and full annotation coverage, the description need not restate returns, and it supplies the behavioral caveats an agent needs (staleness of retained prompts, U-Boot workflow handoff). It omits retention limits and what happens with an invalid/expired cursor, a modest remaining gap.

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 coverage is 100%, so every parameter including cursor semantics is already documented in the schema; the description's cursor-omitted/immediate rule largely restates the schema's 'when set, wait for newer output'. Baseline 3 applies since the schema does the heavy lifting.

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?

States a specific verb and resource (read retained terminal output) with the exact condition that selects immediate-vs-blocking behavior: cursor omitted. It explicitly names the sibling it is not (terminal_wait) and the tool it feeds (terminal_enter_uboot), so an agent can route correctly without opening any schema.

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?

Gives explicit when-to-use (cursor omitted for immediate read), the alternative and its trigger condition (terminal_wait after a known cursor), and a when-not-to-do-something warning: don't poll and send keys from the client to catch the U-Boot countdown, let the Host-side terminal_enter_uboot interrupt it.

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