Skip to main content
Glama
Kingdee MCP Unified

Kingdee MCP Unified

by sclyxnet

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

切换金蝶连接与登录信息(服务器/账套/账号/密码/登录方式/应用授权/多语言),并重连。

所有参数可选,只改传了的项,其余沿用当前配置。切换后:

  1. 立即重置登录会话 → 下一次 API 调用自动用新配置重新登录(即"重连");

  2. verify=True(默认)时立即试登录一次并报告结果,失败会给出明确原因;

  3. 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

NameRequiredDescriptionDefault
lcidNo
app_idNo
verifyNo
persistNo
passwordNo
usernameNo
auth_modeNo
app_secretNo
server_urlNo
data_centerNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.11

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the whole burden and does most of it: it declares the immediate session reset, that the next API call re-authenticates, that verify defaults to True and reports explicit failure reasons, and that persist=True writes to ~/.workbuddy/mcp.json. Gaps remain on operational risk — whether a failed verify still leaves the runtime config switched, and whether password is stored in cleartext in that file.

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

Conciseness4/5

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

Front-loaded with the one-line purpose, then a numbered three-item behavior list, then a per-argument block — a sound structure for a 10-parameter tool. The text is long but nearly every line supplies information an agent needs; a few lines (e.g. the parenthetical '即"重连"') are redundant.

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

Completeness4/5

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

An output schema exists, so return-value explanation is not required, and the description still covers defaults, persistence semantics, and verification behavior for a 10-param mutation tool. What is missing is failure-state semantics — the effect of a failed verify on the applied config, and how to revert a bad switch.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for 10 parameters, so the description must compensate entirely, and it does: every parameter is documented with meaning, accepted values, and defaults (password/app_secret modes, lcid 2052, persist False, verify True). It adds real semantics the schema cannot express — '/k3cloud/' auto-appending, fuzzy data-center matching resolved to a login Id on the newly switched server, and lcid being preserved unless explicitly passed.

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

Purpose4/5

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

States a specific verb and resource — 切换金蝶连接与登录信息(服务器/账套/账号/密码/登录方式/应用授权/多语言),并重连 — and enumerates the credential fields it governs. It never explicitly distinguishes itself from close siblings such as kingdee_switch_data_center or kingdee_show_login_info, so an agent must infer the boundary. Still, the 'switch + reconnect' framing is concrete rather than tautological.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clear operating contract: '仅改传了的项,其余沿用当前配置', plus a named alternative for one sub-task ('可先用 kingdee_list_login_languages 查看支持哪些语言'). It does not state when to prefer kingdee_switch_data_center or kingdee_test_login over this tool, so the when-not guidance is incomplete rather than absent.

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

Deploy Server

Other Tools