Skip to main content
Glama
cygnussystems

cygnus-ssh-mcp

Official

ssh_file_stat

Get status information for a remote file or directory via SFTP, returning existence, type, size, and timestamps without shell commands.

Instructions

Get status information about a file or directory (via SFTP stat - works the same way on all platforms, no shell command involved).

On Windows, mode/uid/gid come from the SFTP subsystem's own cross-platform attribute reporting, not real Windows ACLs/ownership - Windows has no equivalent concept, so these values (e.g. uid/gid of 0) are not meaningful there and should not be relied on to reason about actual Windows permissions/ownership. type/size/atime/mtime are unaffected and accurate on all platforms.

Returns: {'exists': True, 'path', 'type' ('file'/'directory'/'symlink'/'unknown'), 'mode' (octal string, e.g. "0o40755"), 'uid', 'gid', 'size' (bytes), 'atime', 'mtime'} when the path exists. atime/mtime are raw numeric Unix timestamps (seconds since epoch, as returned by SFTP), not formatted date strings - convert with datetime.fromtimestamp() if you need a readable date. If the path does NOT exist (or stat failed for another reason, e.g. permission denied), returns {'exists': False, 'path', 'error'} instead - this is a normal, non-exceptional return value, not a raised error. If the check itself fails (permission denied, no SFTP on this host, ...), exists is None (unknown), not False, with the reason in error.

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
pathYesFile or directory path to get information about

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it discloses cross-platform caveats (Windows mode/uid/gid are not real ACLs and shouldn't be reasoned about), the exists=True/False/None semantics with error strings, the fact that a missing path is a normal non-exceptional return, and the long-running wait cap with the busy constraint and polling target.

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?

Length is substantial but largely earned by the platform caveats, error tri-state, and long-running protocol, and it is front-loaded with the core purpose. The Windows attribute paragraph is arguably over-detailed relative to its decision value, keeping it just short of a 5.

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?

Even though an output schema exists and would relieve the description of explaining return values, the description goes further by covering the non-obvious error tri-state, timestamp format, platform caveats, and the async handle flow. Nothing an agent needs to call this correctly is missing.

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% for the single path parameter, so the schema already documents it. The description adds no syntax, format, or path-resolution detail beyond 'file or directory path', so the baseline 3 applies.

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 ('Get status information about a file or directory') and pins down the mechanism ('via SFTP stat'), which differentiates it from shell-based siblings like ssh_cmd_run. An agent knows exactly what it retrieves without opening the schema.

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

Usage Guidelines3/5

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

The description implies its purpose but never states when to prefer this over adjacent siblings (e.g. ssh_dir_list_advanced, ssh_file_read, ssh_dir_calc_size). It does give one actionable routing instruction - poll ssh_cmd_check_status on in_progress and don't re-call - but no when/when-not guidance for the core stat operation itself.

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