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/

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}")

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