Skip to main content
Glama
devnullvoid

mcp-ssh-tmux

by devnullvoid

read_remote_file

Read full file contents from a remote host over SSH, preferring direct file transfer and falling back to tmux PTY history if needed. Ideal for configs, logs, and source code.

Instructions

Read a file from the remote host using the established session.

Prefer this over running 'cat' via send_command/get_snapshot when you want file contents. send_command() and get_snapshot() only return the last N lines of visible terminal output.

read_remote_file() attempts a direct SSH file read first so agents can get the full file instead of just the pane tail. If that is not possible, it falls back to reading via the existing PTY. fallback_lines controls how much tmux history to inspect during that PTY fallback (default 200). Best for text files such as configs, logs, and source code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes
remote_pathYes
fallback_linesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description fully carries behavioral disclosure. It reveals the attempt to do a direct SSH read first, the fallback to PTY, and the role of fallback_lines in tmux history. It also implies a limitation for non-text files, which is useful context.

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 well structured: a clear opening, a rationale contrasting with alternatives, then fallback details and use cases. Every sentence adds value without padding. It is concise enough while conveying all necessary nuance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that an output schema exists (so return format needs no explanation) and the tool's functionality is moderately complex, the description covers the core mechanics, the fallback path, the parameter specifics, and the ideal domain. This is sufficiently complete for an agent to invoke correctly.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must add meaning. It explains fallback_lines in detail ('controls how much tmux history to inspect during that PTY fallback (default 200)'). For session_id and remote_path, the names and the opening sentence make their purpose evident, though not spelled out explicitly.

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 opens with a specific verb+resource pair: "Read a file from the remote host using the established session." It also distinguishes itself from siblings by explicitly contrasting with send_command/get_snapshot, making the tool's unique purpose clear.

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?

Provides explicit guidance: "Prefer this over running 'cat' via send_command/get_snapshot when you want file contents," and explains why, because those alternatives only return the last N lines. It also notes the best use case (text files like configs, logs, source code).

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/devnullvoid/mcp-ssh-tmux'

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