Skip to main content
Glama
atengk
by atengk

ssh_connect

Connect to a Linux server via SSH or load a saved ~/.ssh/config alias to establish a remote session for commands and file transfers.

Instructions

建立新的 SSH 主机连接,或依据本地 ~/.ssh/config 别名载入配置

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNo目标 Linux 服务器的主机名或 IP 地址
portNoSSH 端口号,默认 22
passwordNo登录密码(可选,优先推荐使用密钥认证)
usernameNo登录远程主机的用户名
proxyJumpNo跳板机别名、连接字符串 (user@bastion:22) 或结构化认证凭据配置
passphraseNo若私钥受密码保护,提供解密口令
privateKeyNoPEM/OpenSSH 格式的私钥内容,或私钥文件的本地绝对路径
connectionIdNo自定义连接标识符,未指定则自动分配唯一 ID
readyTimeoutNo建立连接就绪握手超时时间(毫秒),默认 30000
setAsDefaultNo是否将该连接设为后续操作的默认活跃连接,默认 true
sshConfigAliasNo本地 ~/.ssh/config 中配置的 Host 别名(如 prod-server)
keepaliveIntervalNo心跳保活检测发送间隔(毫秒),默认 10000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.5

TDQS

B3.2/5.0
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 only states that it establishes or loads a connection; it omits authentication flow, connection persistence, error handling, and whether the connection becomes the default active connection (setAsDefault is only in schema).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler. It efficiently conveys the core purpose and the alias-based alternative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 12-parameter connection tool with no annotations and no output schema, the description is too thin. It does not explain that this creates a persistent connection usable by ssh_exec/ssh_session_* tools, nor does it cover authentication expectations or lifecycle management.

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 100%, so the schema already documents all 12 parameters. The description adds a small hint about ~/.ssh/config alias usage but does not explain parameter syntax or interactions beyond that.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (建立 SSH 主机连接) and an alternative mode (载入 ~/.ssh/config 别名). It clearly distinguishes from siblings like ssh_exec or sftp_* which operate on an existing connection.

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?

Describes two connection modes but gives no guidance on when to use this tool versus ssh_session_start, ssh_ping, or other siblings. No prerequisites or when-not conditions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.