Skip to main content
Glama
cygnussystems

cygnus-ssh-mcp

Official

ssh_archive_extract

Extract .tar, .tar.gz, or .zip archives into a directory on a remote SSH host. Format is chosen by file extension and must match the server's OS.

Instructions

Extract an archive to a directory. The accepted format is platform-specific and determined purely by archive_path's file extension (not by inspecting the archive's actual content):

  • Linux/macOS: .tar.gz, .tgz, or .tar only. A .zip file (e.g. created by ssh_archive_create on Windows) will fail here with an unsupported-format error.

  • Windows: .zip only. A .tar/.tar.gz file (e.g. created by ssh_archive_create on Linux/macOS) will fail here the same way. There is no cross-platform-portable archive format currently available through this tool - archives must be created and extracted on the same OS family.

overwrite=False (default) does not fail outright if some files already exist at the destination - on Linux/macOS it extracts everything else and just logs a warning about the skipped files (no per-file detail returned); on Windows the behavior follows Expand-Archive's own overwrite handling.

On a 'linux'/'flex' connection with a BusyBox-style tar (check ssh_conn_connect/ssh_conn_host_info's capabilities), this can raise a clear error instead of running - unlike the wrong-format/extraction-error cases below, which return an error dict, this is a raised exception. Two independent gaps: missing --strip-components blocks extraction entirely (no clean single-tool fallback - extract without stripping via ssh_cmd_run, the archive's own top-level directory will remain, then relocate its contents up one level yourself); missing --keep-old-files only blocks when overwrite isn't explicitly True - passing overwrite=True avoids that one specifically.

Returns: On success: {'status': 'success', 'success': True, 'destination_path', 'files_extracted' (number of files), 'directories' (number of folders), 'extracted_files' (the first 50 file paths, relative to destination_path), 'extracted_files_truncated' (True if there are more), 'note' (how to list them all, and whether existing files were kept because overwrite=False)}. On failure: {'status': 'error', 'message': str, 'extracted_files': []} - not a raised exception.

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
archive_pathYesPath to the archive file
destination_pathYesDirectory to extract to

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 are provided, so the description carries the full behavioral burden and does so: it distinguishes raised exceptions (BusyBox tar gap) from returned error dicts, explains that overwrite=False degrades to a warning on Linux but defers to Expand-Archive on Windows, and discloses the single-operation-at-a-time 'busy' constraint. These are non-obvious traits an agent could not infer from schema alone.

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-loads the core action and the platform rule, and each paragraph carries real operational content. It is long and somewhat dense, with a few passages (the two 'independent gaps') that could be tightened, and it re-describes return fields already covered by the output schema, which costs a point.

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 4-parameter mutation-adjacent tool with no annotations, it covers platform constraints, failure vs exception behavior, overwrite edge cases, fallback procedures, and the async in_progress/polling contract. An agent has everything needed to call it correctly and recover from its failure modes.

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 the baseline is 3; the description goes beyond it by explaining that archive_path's extension alone determines the accepted format (not content sniffing) and by detailing the partial-success semantics of overwrite=False rather than just restating the flag. It does not add much on use_sudo or destination_path, keeping it short of a 5.

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 ('Extract an archive to a directory') and immediately scopes it against the sibling ssh_archive_create by explaining that the two operate on platform-specific formats. An agent can tell exactly what this does and how it relates to the archive-creation tool 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?

Explicitly states when extraction succeeds and when it fails (Linux/macOS tar-only vs Windows zip-only, with a worked example of the mismatch), notes that no cross-platform format exists, and names the fallback path via ssh_cmd_run for the BusyBox --strip-components gap. It also routes the agent to ssh_cmd_check_status for long calls and forbids re-invoking meanwhile.

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