Skip to main content
Glama
liang04
by liang04

list_directory

Retrieve structured file listings from remote SSH directories to view contents, permissions, sizes, and modification times for efficient remote file management.

Instructions

获取远程目录的结构化文件列表

Args:
    remote_path: 远程目录路径,默认为当前目录 "."
    timeout: 操作超时时间(秒),默认30秒
    connection_name: SSH连接名称,如果不指定则使用默认连接

Returns:
    Dict包含目录列表结果:
    - success: 是否成功获取
    - path: 目录路径
    - files: 文件列表,每个文件包含:
        - name: 文件名
        - type: 类型 (file/directory/symlink/other)
        - size: 文件大小(字节,仅文件类型)
        - permissions: 权限字符串(如 "rwxr-xr-x")
        - modified_time: 修改时间(Unix时间戳)
        - owner_uid: 所有者UID
        - group_gid: 组GID
    - total_count: 文件总数
    - connection: 使用的连接名称
    - error: 错误信息(如果有)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
remote_pathNo.
timeoutNo
connection_nameNo

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/liang04/ssh-mcp'

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