Skip to main content
Glama
liang04
by liang04

execute_command

Execute shell commands on remote servers via SSH connections. Run commands with configurable timeout and output limits, returning execution results including exit codes and output.

Instructions

在远程服务器上执行shell命令

Args:
    command: 要执行的shell命令
    timeout: 命令执行超时时间(秒),默认30秒
    max_output_size: 最大输出大小(字节),默认8192(8KB)。
                    设置为0表示不限制(注意可能导致内存问题)。
                    超过限制的输出会被截断。
    connection_name: SSH连接名称,如果不指定则使用默认连接

Returns:
    Dict包含执行结果:
    - success: 是否成功执行
    - exit_code: 命令退出码
    - stdout: 标准输出
    - stderr: 标准错误输出
    - truncated: 输出是否被截断
    - error: 错误信息(如果有)
    - connection: 使用的连接名称

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes
timeoutNo
max_output_sizeNo
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