save_server
Save SSH server configurations and credentials with environment labels to prevent accidental production changes. Requires confirmation token for overwriting existing configs.
Instructions
保存服务器配置和凭证。覆盖现有配置时需要先获取 confirmationToken。强烈建议设置 environment 字段以防止误操作生产服务器。
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": {
"alias": "<alias>",
"host": "<host>",
"username": "<username>",
"authType": "<authType>"
},
"name": "save_server"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alias | Yes | 服务器别名(唯一标识) | |
| host | Yes | 服务器地址 | |
| port | No | SSH 端口(可选,默认 22) | |
| username | Yes | 用户名 | |
| authType | Yes | 认证类型:password 或 privateKey | |
| password | No | 密码(当 authType=password 时必须提供) | |
| privateKey | No | 私钥内容或私钥文件路径(如 /path/to/id_rsa)。当 authType=privateKey 时必须提供 | |
| passphrase | No | 私钥密码(仅 privateKey 有密码保护时需要) | |
| environment | No | 环境标签(强烈建议设置,用于防止误操作生产服务器) | |
| description | No | 服务器描述 | |
| group | No | 服务器分组 | |
| confirmationToken | No | 覆盖现有配置时需要的确认 token(首次调用会返回 token,使用 token 再次调用以确认) |