Skip to main content
Glama
atengk
by atengk

sftp_upload_dir

Upload and extract an entire local directory tree to a remote host over SFTP, applying .gitignore and custom exclude patterns during transfer.

Instructions

基于纯 JS 内存流式 Tar 架构将宿主机本地整个目录树批量打包上传至远程主机并解压

Input Schema

NameRequiredDescriptionDefault
localPathYes宿主机本地待上传目录的绝对路径
remotePathYes远程目标解包目录绝对路径(不存在时会自动创建)
connectionIdNo目标连接标识符,缺省时使用当前默认连接
useGitignoreNo是否自动读取待同步目录下的 .gitignore 文件规则并合并至排除清单,默认 true
excludePatternsNo通配排除规则列表(例如 ['**/node_modules/**', '**/.git/**']),匹配的文件与目录将被忽略不传输

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?

No annotations are provided, so the description carries the full behavioral burden. It discloses the internal mechanism (pure JS in-memory streaming Tar) and implies archive-and-extract semantics, but says nothing about overwrite behavior on the remote, permissions, failure/partial-transfer handling, or auth requirements.

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?

A single front-loaded sentence with no filler. It is efficient, though it spends words on implementation architecture ('纯 JS 内存流式 Tar 架构') that is less actionable for an agent than behavioral facts would be.

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

Completeness3/5

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

For a directory-upload tool with no annotations and no output schema, the description conveys the core mechanism and the schema covers all inputs, but it leaves out overwrite semantics and error/partial-transfer behavior. Adequate but with clear gaps.

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 every parameter (localPath, remotePath, connectionId, useGitignore, excludePatterns) is already documented in the schema. The description adds no parameter-level detail beyond noting the batch/directory nature, so the baseline 3 applies.

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?

States a specific verb+resource: batch-packaging the entire local directory tree and uploading it to the remote host, then extracting. This clearly distinguishes it from single-file sftp_upload and from sftp_download_dir, though it never names 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 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 versus sftp_upload (single file) or other transfer tools, and no exclusions or prerequisites stated. The scope word '整个目录树批量' implies directory-level use but stops short of any explicit when/when-not routing.

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