server_add
Register a new SSH server at runtime by writing to .env and updating the memory cache, enabling immediate use by server_exec without restarting the connector.
Instructions
运行时注册一个新的 SSH 服务器:写入 .env 并更新内存缓存,无需重启连接器即可被 server_exec 使用
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"host": "<host>",
"username": "<username>"
},
"name": "server_add"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | 服务器公网 IP 或域名 | |
| name | Yes | 服务器名称(唯一标识),如 Tencent-LH | |
| port | No | SSH 端口,默认 22 | |
| password | No | 密码(与 privateKey 二选一) | |
| username | Yes | 登录用户名,如 root 或 ubuntu | |
| privateKey | No | 私钥本地绝对路径,如 C:/Users/xxx/.ssh/id_ed25519 |