Skip to main content
Glama
nwnusun-cool

MCP SSH Tools Server

by nwnusun-cool

list_directory

List contents of a remote directory on a specified server using MCP SSH Tools Server. Provide server name and optional path to access and manage files efficiently via SSH.

Instructions

列出远程目录内容 参数:

  • server_name: 服务器名称

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo/
server_nameYes

Implementation Reference

  • main.py:454-462 (handler)
    The main handler function for the 'list_directory' tool. It is decorated with @mcp.tool(), which likely handles both implementation and registration in the MCP framework. The function executes 'ls -la' on the remote server path using a helper 'execute' function.
    @mcp.tool() def list_directory(server_name: str, path: str = "/") -> Dict[str, Any]: """ 列出远程目录内容 参数: - server_name: 服务器名称 - path: 目录路径,默认为根目录 """ return execute(server_name, f"ls -la {path}")

Other Tools

Related 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