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

ssh_read_file

Read-only

Read a remote text file over SFTP using a host ID, with 1-based start line and bounded output. Use it to inspect specific file sections without transferring whole files.

Instructions

Read a remote text file through SFTP with 1-based startLine and bounded output. Use ssh_download_file for binary data.

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": {
      "hostId": "<hostId>",
      "path": "<path>"
    },
    "name": "ssh_read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
limitNo
hostIdYesRequired stable host ID returned by ssh_list_hosts. Names are not accepted.
startLineNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered by structured data. The description adds useful behavior beyond that: text-only access and bounded output via the startLine/limit window. It does not say how truncation is signalled, what happens to non-UTF-8 content, or whether an out-of-range startLine errors or returns empty — gaps that matter for a paging reader.

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?

Two sentences, zero filler, with the core purpose front-loaded and the disambiguation clause second. Every phrase earns its place; there is no restating of the name or title.

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

Completeness3/5

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

With no output schema and 4 parameters, the description must imply the return shape, and it only gestures at it via 'bounded output'. An agent cannot tell whether the response is raw text, a line-array, or includes a truncation flag, which is significant for a paging read tool. Given how much the annotations and schema already supply, this is adequate but not complete.

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 only 25% (hostId is the sole documented field), so the description carries real weight here. It usefully clarifies that startLine is 1-based, which the schema's bare 'minimum: 1' does not convey, and implies limit bounds the output. However, it never defines limit as a line count versus a byte cap, leaves path unexplained, and says nothing about the interaction between startLine and limit when the file is shorter than the window.

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 names a specific verb and resource ('Read a remote text file through SFTP') plus the access channel, which is more precise than the bare name. It also explicitly carves itself away from ssh_download_file, so an agent can distinguish it from the binary-transfer sibling without opening either schema.

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?

It gives one explicit alternative with the selecting condition ('Use ssh_download_file for binary data'), which is genuinely actionable routing guidance. It stops short of the full picture, though: no mention of using ssh_grep for searching file contents or ssh_shell_exec for large/streamed reads, and no note on when line paging is preferable to a full download.

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