Skip to main content
Glama
SSH MCP Server

SSH MCP Server

by YawLabs

ssh_ls

Read-only

List files in a remote directory over SFTP by specifying an SSH host and absolute path; waits for a connection-pool slot when capacity is full.

Instructions

List files in a directory on a remote host via SFTP. 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 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 directory"New value: +"Absolute path to the remote directory. Must start with /."
  2. Changed5 schema fields changedv0.9.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / password / description
      Previous value: -"SSH password (prefer keys)"New value: +"SSH 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."
    • addedInput schema / properties / port / maximum
      Added value: +65535
    • addedInput schema / properties / port / minimum
      Added value: +1
    • changedInput schema / properties / port / type
      Previous value: -"number"New value: +"integer"
  3. First observedv0.2.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered; the description adds genuinely new behavioral context by disclosing the connection-pool limit (SSH_MCP_MAX_POOL_SIZE, default 100) and a 30s wait before starting, which tells the agent this call can block. It stops short of stating result shape, whether listing is recursive, or whether hidden files are included.

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?

Two sentences, zero filler, and the core operation is front-loaded ahead of the secondary pool-exhaustion caveat. Every clause carries information an agent can act on.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 is the only place to learn what a listing returns (entry names only? metadata? symlink handling?), and it says nothing about that. The blocking/pool behavior is covered well, but for a read/list tool the return semantics gap is a real omission.

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 coverage is 100%, so all six parameters (including the plaintext-password warning and default port/user) are already documented in the schema. The description adds no parameter-level meaning beyond what the schema provides, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('List files in a directory on a remote host') plus the transport ('via SFTP'), so the agent knows exactly what operation this performs. It does not, however, distinguish itself from close siblings like ssh_find or ssh_stat, which also touch remote paths.

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

Usage Guidelines2/5

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

The second sentence describes pool-exhaustion behavior, not when to choose this tool over alternatives. There is no guidance on when to use ssh_ls versus ssh_find (search), ssh_stat (metadata), or ssh_read_file (contents), and no stated prerequisites beyond the implied SSH connection.

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