Skip to main content
Glama
SSH MCP Server
by termau

read_remote_file

Read-only

Read the contents of a file on a remote server using a saved SSH connection and an absolute path, returning the text for inspection or troubleshooting.

Instructions

Read the contents of a file on a remote server.

Parameters:

  • connection: Name of the connection (from list_connections)

  • path: Absolute path to the file on the remote server

Example usage: read_remote_file("web1", "/etc/nginx/nginx.conf")

Returns the file contents as text.

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": {
      "connection": "<connection>",
      "path": "<path>"
    },
    "name": "read_remote_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to the file on the remote server
connectionYesName of the SSH connection to use

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered, and the description adds genuinely new behavioral context: the result is returned as text, implying text-only reads rather than binary transfer. It stops short of disclosing size limits, encoding assumptions, or permission/auth failures, which would matter for arbitrary remote paths.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

The one-line purpose is front-loaded and the example call makes the invocation pattern immediately copyable. The 'Parameters:' block largely duplicates schema descriptions word for word, which costs a little space without adding information.

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 two-parameter read-only tool with full schema coverage and no output schema, the definition covers purpose, inputs, an example, and the return type ('as text'). Remaining gaps are minor behavioral edge cases (large files, binary content, error conditions) rather than anything that would cause a mis-call.

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 the baseline is 3. The description restates both parameters and adds the useful provenance note that the connection name comes from list_connections plus a concrete example call, but adds no format detail (e.g. path syntax edge cases) beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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, 'Read the contents of a file on a remote server,' which is unambiguous about the action and target. It implicitly separates itself from download_file/upload_file by framing the result as text rather than a transferred file, but it never names or contrasts a sibling explicitly.

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

Usage Guidelines3/5

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

Usage context is only implied: it tells the agent to get the connection name 'from list_connections', which is a useful prerequisite hint, and shows one example call. It gives no when-to-use versus when-not guidance – for instance nothing distinguishes it from download_file for binary content or run_command with cat.

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