Skip to main content
Glama
atengk
by atengk

sftp_download_dir

Download a remote directory over SFTP by packaging it as a streaming tar archive and extracting it into a specified local path.

Instructions

基于纯 JS 流式 Tar 架构将远程目录打包并流式下载解压至宿主机本地

Input Schema

NameRequiredDescriptionDefault
localPathYes宿主机本地保存并解压的目标目录绝对路径
remotePathYes远程待打包下载的目录绝对路径
connectionIdNo目标连接标识符,缺省时使用当前默认连接
useGitignoreNo是否自动探测远程目录下的 .gitignore 规则并转译为 tar 排除参数,默认 true
excludePatternsNo通配排除规则列表(例如 ['node_modules', '.git', '*.tmp']),匹配的文件与目录将被忽略不下载

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.1

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It describes the tar-stream mechanism but omits critical behavior: whether local files are overwritten, whether the target directory must exist, permission requirements, symlink handling, and error behavior during partial extraction.

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 description is a single concise sentence with little waste. The implementation detail about 'pure JS streaming Tar architecture' is somewhat unnecessary for an agent, but it does not obscure the main purpose.

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

Completeness2/5

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

For a tool that mutates the local filesystem by extracting an archive, the description is incomplete. With no annotations and no output schema, it should clarify overwrite behavior, local directory creation, and failure semantics.

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 input schema already documents each parameter thoroughly. The description does not add parameter-specific meaning beyond what the schema provides, making the baseline 3 appropriate.

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 states a specific action and resource: package a remote directory and stream-download/extract it locally. It is clear what the tool does, but it does not explicitly distinguish itself from sibling tools like sftp_download or sftp_upload_dir.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives such as sftp_download for single files or sftp_upload_dir. The implied use case is downloading a directory, but no conditions, exclusions, or prerequisites are mentioned.

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