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

Download Remote File or Directory to Local

ssh_download

Download remote files or directories over SSH/SFTP to the local filesystem without passing file bytes through the LLM context; supports recursive transfers, overwrite control, and SHA-256 checks.

Instructions

Stream a remote file or directory directly to the local filesystem without passing file bytes through the LLM context. Uses SFTP with automatic pipe fallback, defends against path traversal/symlinks, defaults to overwrite=false, and verifies SHA-256 on single files. Permitted even on read-only targets.

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>",
      "remote_path": "<remote_path>",
      "local_path": "<local_path>"
    },
    "name": "ssh_download"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetYesSSH target as configured host alias, host, user@host, user@host:port, or [ipv6]:port. Never include remote paths in target.
excludeNoOptional directory names or glob patterns to exclude during recursive download
overwriteNoMust be true to overwrite existing local file(s) (default: false)
recursiveNoRequired when downloading a directory (default: false)
local_pathYesLocal destination file or directory path
remote_pathYesExplicit remote absolute path (e.g. /etc/nginx/nginx.conf or C:\Services\app.json) or home-relative ~/... path. Bare relative paths are rejected.
verify_checksumNoVerify SHA-256 checksum after single-file download (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Adds genuinely useful behavior beyond the annotations: SFTP with automatic pipe fallback, path traversal/symlink defenses, overwrite defaulting to false, and SHA-256 verification for single files. However it never explains outcome on checksum mismatch, whether partial files are left behind on failure, or what a directory download returns, which matters for a non-idempotent write to local disk. The 'permitted on read-only targets' note is about the remote, not the tool, but does not contradict readOnlyHint=false.

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?

Core purpose is front-loaded in the first clause and every subsequent phrase carries information (fallback, defense, defaults, checksum). It reads as one long run-on sentence, which slightly hurts scannability.

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?

With no output schema, the description should say what comes back (local path, checksum status, file count for directories) — that is missing. Otherwise it covers the operational essentials an agent needs: transport, safety rules, defaults, and verification.

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 coverage is 100%, so all seven parameters are already documented, including the overwrite and verify_checksum defaults. The description reinforces overwrite=false and single-file checksum verification but says nothing about recursive or exclude, so it adds only marginal meaning over the schema.

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 ('Stream a remote file or directory directly to the local filesystem') plus the key differentiator from ssh_read: bytes never enter LLM context. An agent can distinguish this from ssh_upload/ssh_read without opening the 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?

The phrase 'without passing file bytes through the LLM context' implicitly routes the agent away from context-reading tools for large payloads, and 'Permitted even on read-only targets' clarifies a usage boundary. It stops short of explicitly naming an alternative (e.g. ssh_read for small text) or stating when not to use it.

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