Skip to main content
Glama

sftp_transfer

Download or upload a file between a preset SSH host and the local machine using get/put direction, with allow-listed paths and key-based, host-verified authentication.

Instructions

Transfer a file between the preset's SSH host and the local machine. direction must be "get" (download) or "put" (upload). The remote path must match the preset's sftp_allowed_paths prefixes; the local path must be under $HOME or /tmp (and the preset's allowed_local_paths, if set), not a hard link, and not where credentials or startup files live (~/.ssh, ~/.aws, shell rc files, agent configs, mcp-warden's config). Always key-based auth, host-key verified. If the user previously approved a time-boxed window for this preset+action, the call proceeds without a new prompt and is recorded as 'windowed' in the audit log.

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": {
      "preset_name": "<preset_name>",
      "direction": "<direction>",
      "remote": "<remote>",
      "local": "<local>"
    },
    "name": "sftp_transfer"
  }
}

Input Schema

NameRequiredDescriptionDefault
localYes
remoteYes
directionYes"get" (download) or "put" (upload).
preset_nameYes

Output Schema

NameRequiredDescriptionDefault
bytesYes
localYes
remoteYes
directionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses key-based auth, host-key verification, the deny list of sensitive locations (~/.ssh, ~/.aws, shell rc files, agent configs, warden config), and the audit/approval behavior including 'windowed' calls proceeding without a prompt. It omits overwrite semantics and size/atomicity behavior, 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.

Conciseness4/5

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

Front-loaded with the core action and the direction enum before the constraint list. The single long sentence enumerating exclusions is dense but every clause is a real rule. The parenthetical list of sensitive paths borders on exhausting but is useful detail rather than filler.

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?

Because an output schema exists, return values need not be described, and the description covers auth model, path gating, and approval/audit flow for a 4-required-param mutation tool with no annotations. The main residual gaps are overwrite behavior and error surfaces for path-policy rejections.

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

Parameters4/5

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

Schema coverage is only 25% (only `direction` is documented in-schema), so the description must compensate and largely does: it constrains `remote` to the preset's `sftp_allowed_paths` prefixes, constrains `local` to $HOME or /tmp plus `allowed_local_paths` and exclusion zones, and implies `preset_name` selects the SSH host. It never explains what `preset_name` format is expected or whether `remote` may be relative.

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?

Opens with a specific verb+resource+scope: 'Transfer a file between the preset's SSH host and the local machine.' This is clearly distinguishable from the sibling tools ssh_exec and ssh_run, which execute commands rather than move files, and from db_query/proxy_http.

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?

Gives the operative usage rule up front: `direction` must be 'get' (download) or 'put' (upload), so an agent knows which mode to pick. It also states the path-permission preconditions for both ends. It stops short of explicitly saying when to prefer this over ssh_exec for moving content, so it is clear context but not full alternative routing.

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