kingdee_switch_login
Switch Kingdee connection and login details—server, account set, credentials, auth mode, language—then reset the session and reconnect; optionally verify login and persist changes.
Instructions
切换金蝶连接与登录信息(服务器/账套/账号/密码/登录方式/应用授权/多语言),并重连。
所有参数可选,只改传了的项,其余沿用当前配置。切换后:
立即重置登录会话 → 下一次 API 调用自动用新配置重新登录(即"重连");
verify=True(默认)时立即试登录一次并报告结果,失败会给出明确原因;
persist=True 时把新配置写回 ~/.workbuddy/mcp.json(重启后仍生效)。
Args:
server_url: 金蝶服务器地址,可传裸地址(如 http://your-kingdee-host)或完整地址;
不含 /k3cloud/ 会自动补齐。
data_center: 账套。可用中文账套名 / 账套号(Number) / 登录 Id,例如"预生产""TEST20230518";
支持片段模糊匹配,会在(切换后的)服务器上取账套列表解析成登录 Id。
username: 金蝶账号(password 模式)。
password: 金蝶账号密码(password 模式)。
auth_mode: 登录方式:password(默认) | app_secret。
app_id: 第三方应用 AppId(app_secret 模式)。
app_secret: 第三方应用 AppSecret(app_secret 模式)。
lcid: 登录语言,默认 2052(中文(简体))。切换时若未指定则保持当前语言不变;
如需切换,重新调用并传 lcid,可先用 kingdee_list_login_languages 查看支持哪些语言。
persist: 是否把新配置写回 mcp.json(默认 False,仅运行时生效)。
verify: 是否切换后立即试登录验证(默认 True)。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "kingdee_switch_login"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lcid | No | ||
| app_id | No | ||
| verify | No | ||
| persist | No | ||
| password | No | ||
| username | No | ||
| auth_mode | No | ||
| app_secret | No | ||
| server_url | No | ||
| data_center | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |