Skip to main content
Glama
ssh-remote-mcp
by wcbup

Read Remote Text File

ssh_read
Read-onlyIdempotent

Read remote text files over SSH with line numbers, EOL detection, and a SHA-256 hash for optimistic locking. Large files are sliced on the remote host; binary files are rejected.

Instructions

Read a remote text file with line numbers, EOL detection, and SHA-256 content hash (for optimistic locking in ssh_edit). Large files (>2 MiB) are sliced on the remote host without downloading the entire file. Binary files are rejected (use ssh_download instead).

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": {
      "target": "<target>",
      "path": "<path>"
    },
    "name": "ssh_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesExplicit remote absolute path (e.g. /etc/nginx/nginx.conf or C:\Services\app.json) or home-relative ~/... path. Bare relative paths are rejected.
targetYesSSH target as configured host alias, host, user@host, user@host:port, or [ipv6]:port. Never include remote paths in target.
end_lineNo1-based inclusive end line
max_linesNoMaximum lines to return (default 800, max 2000)
start_lineNo1-based inclusive start line

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, and the description adds substantial behavior beyond them: output includes line numbers and EOL detection, a SHA-256 content hash is returned for locking, files over 2 MiB are sliced server-side rather than fully downloaded, and non-text files are refused. These are exactly the operational facts an agent needs before calling.

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?

Three dense sentences with no filler; the core capability comes first, output features second, and the size/binary constraints last. Every clause carries a distinct, actionable fact.

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?

There is no output schema, and the description compensates by describing the response shape (numbered lines, EOL info, content hash) as well as truncation behavior for large files. Combined with 100% schema coverage and full annotations, an agent has everything needed to call it correctly.

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%, so path, target, start_line, end_line, and max_lines are all already documented; the description adds no syntax or interaction detail for those paging parameters (e.g. how start_line combines with max_lines). It only implies a slicing model, so the baseline 3 applies.

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 a remote text file') and immediately enumerates distinguishing behaviors: line numbers, EOL detection, SHA-256 hash, remote-side slicing. It also distinguishes itself from siblings by naming ssh_edit (lock hash) and ssh_download (binaries), so an agent can pick it without opening another 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 an explicit exclusion rule ('Binary files are rejected') paired with the correct alternative ('use ssh_download instead'), and explains the intended downstream use of the returned hash ('optimistic locking in ssh_edit'). Both when-to-use-this and when-to-use-something-else are covered.

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