Skip to main content
Glama

download_file

Download a file from a remote server via SFTP to a local directory, with safety checks preventing overwrites and path traversal.

Instructions

Download a file from a remote server via SFTP.

Args: server: Server name (e.g. 'pro-dicentra'). remote_path: Path to the remote file — normally absolute, though a relative path is not rejected, just resolved by the remote SFTP server against the SSH login directory. Must be a regular file — symlinks, devices, FIFOs, and other non-regular remote files are refused. Rejected if it contains .. anywhere or matches the same sensitive-path denylist upload_file enforces. Size is NOT capped here (upload's 100 MiB limit has no download counterpart) — an oversized transfer only logs a warning, after the bytes are already on disk. local_path: Destination path, RELATIVE to the configured transfer_root (see [settings] in servers.toml, or the SSH_MCP_TRANSFER_ROOT environment variable). Absolute paths, .., . components and embedded NUL bytes are rejected, as is a symlink at any component of the path. Sub-directories are allowed, but every intermediate directory must already exist under transfer_root. NO-CLOBBER: if a file already exists at the destination, the download fails rather than silently overwriting it — remove or rename the existing file first. A failed or cancelled download unlinks the partial file it created, so a retry is not blocked by its own leftovers.

Returns: Confirmation message with file size.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverYes
local_pathYes
remote_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, but the description thoroughly discloses side effects: no-clobber behavior, unlink of partial files on failure/cancellation, rejection of symlinks and sensitive paths, and path validation. This gives full transparency about what the tool will and will not do.

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?

The description is lengthy but every sentence adds essential detail about path handling, security, and failure semantics. It is well-structured with clear parameter labels and a concise Returns section, avoiding redundancy and staying focused on actionable information.

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?

Given the complete absence of annotations and schema-level descriptions, the tool description provides all necessary context: parameters, constraints, side effects, and return value. An agent can safely and correctly invoke this tool based solely on the description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite the input schema having no descriptions (0% coverage), the description text fully explains each parameter: server, remote_path, and local_path, including their path constraints, security restrictions, and behavior (e.g., no-clobber). This effectively compensates for the schema's lack of descriptions.

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 clearly states the tool's purpose with a specific verb ('Download a file from a remote server via SFTP') and resource (file). It is distinguishable from sibling tools like upload_file and execute, as it focuses specifically on downloading a single file.

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 usage scenario is implied by the purpose and the detailed constraints (e.g., path rules, no-clobber, partial file cleanup). It does not explicitly contrast with alternatives, but the unambiguous operation and constraints make the appropriate usage clear.

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