Skip to main content
Glama

Read Screen

read_screen

Captures the current terminal screen and cursor position for an SSH session so you can inspect interactive output without running a new command.

Instructions

Read the terminal screen state for a session.

Returns the current screen content from the terminal emulator, including cursor position. Only works when MCP_SSH_INTERACTIVE_MODE=1 is set.

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": {
      "host": "<host>"
    },
    "name": "read_screen"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostYesHostname, IP address, or SSH config alias
portNoSSH port (optional, will use SSH config or default 22)
usernameNoSSH username (optional, will use SSH config or current user)
max_linesNoMaximum number of lines to return (default: 24)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2+p1

TDQS

A3.5/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 burden. It does disclose the key runtime prerequisite (MCP_SSH_INTERACTIVE_MODE=1) and that cursor position is included in the result, but it omits whether the call is strictly read-only, what happens when the env flag is off (error vs empty), and any truncation behavior beyond the max_lines parameter.

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 short sentences, front-loaded with the action and return value, then the environment gate. Minor redundancy between 'Read the terminal screen state' and 'Returns the current screen content', but nothing is wasted or buried.

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 four fully documented parameters and no output schema, the description supplies what's missing: it explains the return value (screen content with cursor position) and the environment requirement. Only the failure mode when interactive mode is disabled is left unclear, which is a modest gap for this complexity.

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 host, port, username, and max_lines all documented in the schema itself, so the baseline of 3 applies. The description adds nothing about parameter semantics — notably it never mentions how max_lines interacts with the returned screen content.

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 the terminal screen state for a session') and names what is returned (screen content plus cursor position). This is enough to distinguish it from file-oriented siblings like read_file or write_file, though it never names an alternative explicitly.

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?

The gating condition 'Only works when MCP_SSH_INTERACTIVE_MODE=1 is set' is a useful precondition, and 'for a session' implies the interactive-session context. However, there is no explicit guidance on when to prefer this over execute_command or list_command_history, and no statement about what to do if the mode is not enabled.

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