Skip to main content
Glama

ssh_ls

List files in a remote directory over SFTP by specifying host and path. Supports SSH credentials, port, and private key authentication for secure remote file listing.

Instructions

List files in a directory on a remote host via SFTP.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesSSH hostname or IP address
pathYesAbsolute path to the remote directory. Must start with /.
portNoSSH port (default: 22)
usernameNoSSH username (default: current user)
credential_idNoAlias of an SSH password configured only on the MCP server (for example, ssh1 resolves to SSH_CREDENTIAL_SSH1). Never pass a real password here.
privateKeyPathNoPath to SSH private key
Behavior2/5

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

With no annotations provided, the description must carry the full burden of behavioral disclosure. It states the operation uses SFTP but says nothing about return format (e.g., simple filenames vs. detailed info), whether hidden files are included, how errors like permission denied are handled, or whether it follows symlinks. This significant gap leaves the agent uncertain about the tool's behavior.

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?

The description is a single, effective sentence that conveys the core action and transport method with zero wasted words. It is front-loaded and easy to parse, making it exemplary in conciseness.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has six parameters, no output schema, and no annotations. The description only covers the basic action and leaves out critical details such as the expected output shape (is it just names or also metadata?), the behavior for non-existent paths, and any permission or authentication requirements beyond the schema's parameter notes. Given these gaps, the description is not sufficiently complete for an agent to invoke this tool with full confidence.

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 all six parameters (host, path, port, username, credential_id, privateKeyPath) are already documented with meaningful descriptions. The tool description adds no extra parameter-specific semantics beyond the SFTP context, which is marginal. Per the baseline for high schema coverage, a 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?

The description uses a specific verb 'List' and a clear resource 'files in a directory on a remote host', and specifies the method 'via SFTP'. This unambiguously distinguishes it from siblings like ssh_read_file (reads file content) and ssh_stat (checks file metadata). The purpose is immediately clear.

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 when to use the tool (when you need to list directory contents on a remote host), but it does not explicitly contrast with alternatives such as ssh_exec (which could run 'ls') or provide when-not-to-use guidance. The usage context is implicitly clear but not explicitly differentiated from other SSH tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/txcxgzs/ssh-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server