Skip to main content
Glama
cygnussystems

cygnus-ssh-mcp

Official

ssh_dir_copy

Copy a directory recursively from one remote SSH server to another. Use it for remote-to-remote moves; choose a transfer tool for local-to-remote or remote-to-local copies.

Instructions

Copy a directory recursively (remote-to-remote; for local<->remote use ssh_dir_transfer instead).

overwrite controls what happens if destination_path already exists:

  • True: the entire existing destination directory is deleted first, then a fresh copy is made.

  • False (default): does NOT block the copy - it copies into the existing destination as-is, merging with whatever's already there, and any file that shares a name with a source file gets silently overwritten anyway. This does NOT behave like the "fail if destination exists" semantics of ssh_file_move/ssh_file_copy's own overwrite parameter.

Returns: {'status': 'success'/'error', 'files_copied' (int), 'bytes_copied' (int), 'destination_path'} (plus 'message' on error). Note: files_copied/ bytes_copied are computed by counting the destination directory's TOTAL contents after the copy, not just the files newly copied in this call - if merging into a non-empty destination, these counts include pre-existing files too.

Long-running calls: if this takes longer than the server's wait cap (default 50s), it
returns {"status": "in_progress", "handle_id": ...} instead of the result - the work keeps
running. Get the result by polling ssh_cmd_check_status(handle_id=...), which returns this
tool's normal response once finished. Do not call it again meanwhile. Only one such
operation runs at a time; another one started meanwhile fails with a 'busy' error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
use_sudoNoUse sudo for the operation
overwriteNoOverwrite existing files
source_pathYesSource directory path
destination_pathYesDestination directory path
preserve_symlinksNoPreserve symbolic links
preserve_permissionsNoPreserve file permissions

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.8/5.0
Behavior5/5

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

No annotations, so the description carries the full burden and does: overwrite=True deletes the entire existing destination first (a destructive detail), overwrite=False merges and silently overwrites name collisions, async in_progress/handle_id behavior past the 50s wait cap, and a single-concurrent-operation constraint. This is exactly the destructive/async context an agent needs before calling.

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 purpose followed by a scannable bullet for the critical overwrite distinction; nearly every sentence earns its place. The Returns block overlaps with the existing output schema, though the caveat about files_copied/bytes_copied counting total destination contents (not just newly copied files) is real added value.

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?

For a destructive, potentially long-running recursive copy, the description covers routing, overwrite semantics, return shape interpretation, and the async polling contract. Nothing an agent needs to invoke or correctly interpret this call is missing.

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 100% so baseline is 3, but the description adds genuine meaning beyond the schema's thin 'Overwrite existing files' label by spelling out delete-then-copy vs merge-and-silently-overwrite, and explicitly contrasts it with the same-named parameter on other tools. use_sudo, preserve_symlinks and preserve_permissions get no added detail beyond 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+resource (recursive remote-to-remote directory copy) and immediately distinguishes itself from ssh_dir_transfer for local<->remote work, and from ssh_file_move/ssh_file_copy's overwrite semantics. An agent can route correctly without opening any schema.

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

Usage Guidelines5/5

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

Explicit when-to-use (remote-to-remote) and when-not (local<->remote → ssh_dir_transfer). It also gives operational guidance: poll via ssh_cmd_check_status rather than re-calling, and only one such operation runs at a time with a 'busy' error otherwise.

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