Skip to main content
Glama
nwnusun-cool

MCP SSH Tools Server

by nwnusun-cool

list_directory

Lists contents of remote directories via SSH to view files and folders on servers. Specify server name and optional path to browse remote file systems.

Instructions

列出远程目录内容 参数:

  • server_name: 服务器名称

  • path: 目录路径,默认为根目录

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
server_nameYes
pathNo/

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:454-462 (handler)
    The handler function for the 'list_directory' tool. It executes the 'ls -la' command on the remote server using the 'execute' tool to list directory contents.
    @mcp.tool()
    def list_directory(server_name: str, path: str = "/") -> Dict[str, Any]:
        """
        列出远程目录内容
        参数:
        - server_name: 服务器名称
        - path: 目录路径,默认为根目录
        """
        return execute(server_name, f"ls -la {path}")
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the action (list remote directory contents) but lacks critical behavioral details: it doesn't specify what permissions are needed, whether it's read-only or has side effects, what format the output takes (though output schema exists), or any rate limits/errors. For a tool with zero annotation coverage, this is a significant gap in transparency.

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?

The description is appropriately sized with two sentences: one stating the purpose and another listing parameters. It's front-loaded with the main action. However, the parameter list is somewhat redundant with the schema (though schema has 0% coverage), and it could be more structured (e.g., bullet points).

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?

Given 2 parameters with 0% schema coverage and no annotations, the description provides minimal context: purpose and basic param meanings. An output schema exists, so return values needn't be explained. However, for a tool interacting with remote servers (implied by siblings like upload_file), it lacks details on authentication, error handling, or output structure, making it incomplete for safe use.

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 0%, so the schema provides no parameter descriptions. The description adds basic semantics: server_name is '服务器名称' (server name) and path is '目录路径,默认为根目录' (directory path, default is root directory). This clarifies purpose but lacks depth (e.g., path format, server_name examples). With 0% coverage, it partially compensates but not fully, warranting a baseline score.

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?

The description clearly states the verb '列出' (list) and resource '远程目录内容' (remote directory contents), which is specific and actionable. It distinguishes from siblings like download_file or upload_file by focusing on listing rather than file transfer. However, it doesn't explicitly differentiate from list_servers (which lists servers vs. directory contents).

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 description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to use list_directory versus list_servers (for server listing) or other siblings like execute or test_connection. There are no explicit when/when-not statements or named alternatives, leaving usage context unclear.

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/nwnusun-cool/mcp-server-ssh-tools'

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