Skip to main content
Glama
cygnussystems

cygnus-ssh-mcp

Official

ssh_file_read

Read remote file contents via SFTP to avoid shell and console encoding problems, ensuring correct Unicode and binary-safe transfers.

Instructions

Read file contents directly via SFTP.

This tool reads raw bytes from the remote file using SFTP and decodes them on the client side. Unlike command-based file reading (cat, Get-Content), SFTP completely bypasses shell and console encoding issues.

Why use this instead of ssh_cmd_run with cat/Get-Content?

  • Works correctly with Unicode on ALL platforms including Windows

  • Bypasses Windows PowerShell's OEM code page encoding problem

  • More efficient for binary-safe file transfer

  • No shell escaping issues with special characters in content

Returns: Dictionary with: - success: True if file was read successfully - content: The file contents as a string - size: Number of bytes read - encoding: The encoding used to decode the content

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
encodingNoCharacter encoding (default: utf-8)utf-8
max_sizeNoMaximum file size in bytes (default: 10MB, 0 for no limit)
file_pathYesPath to the file to read

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.6/5.0
Behavior5/5

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

No annotations are present, so the description carries full behavioral burden and meets it: it discloses the return shape, client-side decoding, the server wait cap (~50s), the in_progress/handle_id fallback, the required polling via ssh_cmd_check_status, and the single-concurrency 'busy' failure mode. This is unusually rich operational disclosure.

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?

Well front-loaded: purpose, then differentiation, then returns, then long-running behavior. Slightly padded by the bullet list where several points (Unicode, OEM code page, binary-safe, shell escaping) overlap, but nothing is wasted enough to harm selection.

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?

Given an output schema exists, the description need not restate return values, yet it does so briefly and adds the async/polling contract that the schema cannot express. For a read tool with 3 params, all decidable information is present.

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 encoding, max_size, and file_path are already documented in the schema. The description adds only marginal meaning (client-side decode semantics for encoding), which the schema already covers via defaults. Baseline 3 is appropriate.

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 and resource ('Read file contents directly via SFTP') and immediately frames the mechanism (SFTP byte-level read with client-side decoding). It distinguishes itself from sibling ssh_cmd_run by naming that alternative explicitly.

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?

Provides an explicit when-to-use section ('Why use this instead of ssh_cmd_run with cat/Get-Content?') with concrete selection criteria: Unicode correctness across platforms, Windows code page issues, binary safety, shell escaping. The agent can route correctly without inference.

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