Skip to main content
Glama

read_screen

Retrieve the current terminal screen content and cursor position from an active SSH session to inspect ongoing output and session state.

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.

Args: host: Hostname, IP address, or SSH config alias username: SSH username (optional, will use SSH config or current user) port: SSH port (optional, will use SSH config or default 22) max_lines: Maximum number of lines to return (default: 24)

Returns: JSON string with screen lines, cursor position, and dimensions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYes
portNo
usernameNo
max_linesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals the tool is a read operation, requires interactive mode, supports a max_lines truncation, and returns a JSON structure with lines, cursor position, and dimensions. While it doesn't cover all error scenarios, it provides substantial behavioral context beyond just the operation name.

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?

The description is tightly organized with a brief summary, an Args list, and a Returns note. Each sentence and parameter explanation serves a purpose, with no redundant or extraneous content.

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?

The description covers the tool's purpose, prerequisite, parameters, and return type, which is sufficient for an agent to select and invoke it. It doesn't discuss error handling or inactive session behavior, but given the output schema exists and the operation is straightforward, this is not a severe gap.

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

Parameters5/5

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

Schema description coverage is 0%, so the description compensates fully by explaining each parameter's meaning: host accepts hostname/IP/alias, username falls back to config/current user, port uses config or default 22, and max_lines limits the output. This adds significant value beyond the bare schema types and defaults.

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 uses a specific verb ('read') and resource ('terminal screen state for a session'), clearly distinguishing it from sibling tools like execute_command or read_file. It further clarifies that it returns screen content and cursor position, leaving no ambiguity about the tool's function.

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

Usage Guidelines4/5

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

The description provides clear context for when the tool is applicable by stating it 'Only works when MCP_SSH_INTERACTIVE_MODE=1 is set', giving a concrete prerequisite. It does not explicitly name alternative tools or when not to use it, but the purpose is self-evident from the description.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DBeidachazi/mcp-ssh'

If you have feedback or need assistance with the MCP directory API, please join our Discord server