Skip to main content
Glama
mcp-ssh-persistent

mcp-ssh-persistent

by vivusk

ssh_read_remote_file

Read a remote text file over SFTP from a configured server, returning its path, byte size, and raw content; refuses oversized or binary files.

Instructions

Read a remote text file via SFTP. Returns "# ( bytes)" then the raw content. Files above limits.maxReadFileBytes (default 2 MB) or binary files are refused (use ssh_exec with head/tail/sed -n, or ssh_download).

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": {
      "server": "<server>",
      "remote_path": "<remote_path>"
    },
    "name": "ssh_read_remote_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
serverYesServer alias from config.json (case-insensitive). Known aliases: (none configured)
remote_pathYesRemote file path to read

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral load and does it well: it discloses the exact return format ('# <path> (<bytes> bytes)' header plus raw content), the default 2 MB size ceiling, and that oversized or binary files are refused rather than truncated. It omits permission/auth requirements and what the error looks like on refusal, which keeps it below 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the purpose, then the return shape, then the limits and fallbacks; every sentence contributes information an agent needs before calling.

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?

For a simple two-parameter read tool with no output schema, the description explains the return payload and the refusal conditions, which is nearly everything needed. It could add the error shape on refusal, but nothing critical is missing.

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 both parameters are already documented in the schema, and the description adds no meaning about server alias resolution or remote_path syntax. Baseline 3 applies when 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?

The description opens with a specific verb and resource ('Read a remote text file via SFTP'), naming the transport, which separates it from ssh_download and ssh_exec that are named later as fallbacks for out-of-scope cases.

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?

It gives an explicit when-not (files above limits.maxReadFileBytes or binary files are refused) and names the alternatives for that case (ssh_exec with head/tail/sed -n, or ssh_download), so an agent can route without guessing.

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