Skip to main content
Glama
cygnussystems

cygnus-ssh-mcp

Official

ssh_dir_list_advanced

List directory contents recursively with full metadata (size, permissions, ownership, modification time) over SSH when bare filenames are not enough.

Instructions

List contents of a directory recursively with full metadata (size, permissions, ownership, modification time) - use this instead of ssh_dir_list_files_basic (which only returns bare filenames, non-recursive) when you need more than just names, or ssh_dir_search_glob when you only need to filter by filename pattern without full metadata (that tool is also faster for large trees).

max_depth uses standard find -maxdepth semantics: max_depth=1 means path itself plus its immediate children only; omit for unlimited recursion.

On a 'linux'/'flex' connection with a limited BusyBox-style find (no -printf - check ssh_conn_connect/ssh_conn_host_info's capabilities), this raises a clear error instead of running. Fallback: ssh_dir_list_files_basic (non-recursive filenames) plus ssh_file_stat per entry for metadata - both are SFTP-based and unaffected by this, at the cost of one call per directory level.

Returns: List of {'path', 'type', 'size_bytes' (int), 'modified_time' (float Unix timestamp), 'permissions' (string, e.g. "755"), 'user', 'group'}. type is a spelled-out word here ('file'/'directory'/'symlink'/'pipe'/'socket'/ 'block'/'character') - note this differs from ssh_dir_search_glob, which returns single-character type codes ('f'/'d'/'l') for the same concept. On Windows, permissions is always the literal placeholder "0" (Windows has no Unix-style permission bits) and group is always "unknown" - user still reflects the real file owner there.

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
pathYesDirectory path to list
use_sudoNoUse sudo for the operation
max_depthNoMaximum recursion depth (None for unlimited)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.6.1
    • addedOutput schema / properties / result / anyOf
      Added value: +[
      +  {
      +    "items": {},
      +    "type": "array"
      +  },
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / properties / result / items
      Removed value: -{}
    • removedOutput schema / properties / result / type
      Removed value: -"array"
  2. First observedv1.3.0

TDQS

A4.8/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 discharges it well: it discloses the BusyBox `find` failure mode and that it raises an error rather than degrading, the Windows placeholder values for permissions/group, the async long-running behavior (in_progress + handle_id + polling ssh_cmd_check_status, don't re-call), and the single-concurrent-operation 'busy' limit.

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 with purpose and routing, then progressively deeper detail; each block (depth semantics, platform caveats, returns, async) earns its place. It is on the long side and the returns section partly overlaps the existing output schema, but nothing is filler.

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?

Complete for a tool of this complexity: it covers routing, depth semantics, platform-specific errors and fallbacks, the return shape including cross-tool type-code differences, and async polling. An agent has everything needed to call it correctly and recover from the documented 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 baseline would be 3, but the description adds genuine meaning to `max_depth` by explaining `find -maxdepth` semantics with a concrete example (max_depth=1 = path plus immediate children; omit for unlimited). It does not elaborate on `use_sudo`, though that parameter is self-describing in 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 and resource ('List contents of a directory recursively') plus the distinguishing metadata it returns (size, permissions, ownership, modification time). It explicitly differentiates itself from ssh_dir_list_files_basic (bare filenames, non-recursive) and ssh_dir_search_glob (pattern-only, faster on large trees), so an agent can route correctly without opening either 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?

Gives explicit when-to-use and when-not-to-use guidance, naming both alternatives and the conditions that select them ('when you need more than just names', 'when you only need to filter by filename pattern'). It also documents a fallback path with concrete steps (list_files_basic + ssh_file_stat per entry) for constrained hosts.

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