Skip to main content
Glama
SSH MCP Server

SSH MCP Server

by YawLabs

ssh_stat

Read-only

Retrieve remote file or directory metadata over SFTP—including size, permissions, ownership, and timestamps—instead of parsing ls output.

Instructions

Get metadata for a file or directory on a remote host via SFTP. Returns size, permissions (octal), uid/gid, mtime/atime, and the path type. Symlinks are reported as symlink -> <target kind>: the type describes the link itself while size/mode/mtime describe its TARGET, and a dangling symlink is reported rather than erroring. Use this instead of parsing ls -la output. If the connection pool is full (SSH_MCP_MAX_POOL_SIZE, default 100), waits up to 30s for a free slot before starting.

Input Schema

NameRequiredDescriptionDefault
hostYesSSH hostname or IP address
pathYesAbsolute path to the remote file or directory. Must start with /.
portNoSSH port (default: 22)
passwordNoSSH password. STRONGLY prefer key-based auth (privateKeyPath or ssh-agent). Passwords pass through MCP protocol frames as plaintext and may be logged by the transport or host process.
usernameNoSSH username (default: current user)
privateKeyPathNoPath to SSH private key

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.17.0
    • changedInput schema / properties / path / description
      Previous value: -"Absolute path to the remote file or directory"New value: +"Absolute path to the remote file or directory. Must start with /."
  2. Addedv0.11.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnly and openWorld; the description goes further with concrete behavior: symlink type describes the link while size/mode/mtime describe the target, dangling symlinks are reported rather than erroring, and pool saturation causes up to a 30s wait (with the SSH_MCP_MAX_POOL_SIZE knob named). That is exactly the kind of context annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with purpose, then the non-obvious symlink semantics, then the pool-wait caveat. Every sentence carries information an agent would otherwise have to guess.

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?

With no output schema, the description supplies the return fields (size, octal permissions, uid/gid, mtime/atime, path type) and the symlink edge case, plus latency behavior under pool pressure. Nothing critical for correct invocation 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%, so host, path, port, credentials and key path are all documented in the schema, including a strong warning about plaintext passwords. The description adds no parameter-level detail beyond the return-field discussion, so 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 and resource ('Get metadata for a file or directory on a remote host via SFTP') and names the mechanism, immediately distinguishing it from listing tools. The 'instead of parsing ls -la output' line further separates it from ssh_ls-style siblings.

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

Usage Guidelines4/5

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

Explicitly says to use this rather than parsing `ls -la` output, giving a clear usage condition. It does not, however, route against the actual sibling tools (ssh_ls, ssh_find, ssh_read_file) or state when-not-to-use beyond that one comparison.

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