Skip to main content
Glama
gzgs-xgxt-mcp
by yjp-jdp

账号密码登录

xg_login_account

Logs in to the student affairs system with a username and password, using a captcha UUID/code when required, and saves the credential locally for later queries.

Instructions

用学工系统本地登录接口 POST /login 登录。需要验证码时先调 xg_login_captcha 拿 uuid。 密码按明文提交(系统前端就是这么做的),凭证只保存在本机 ~/.xgxt-mcp/token.json。

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": {
      "username": "<username>",
      "password": "<password>"
    },
    "name": "xg_login_account"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNo图形验证码(系统要求时必填)
uuidNoxg_login_captcha 返回的 uuid(系统要求时必填)
passwordYes密码
usernameYes学号 / 工号

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and delivers meaningful security-relevant behavior: the password is submitted in plaintext by design, and credentials are persisted locally at ~/.xgxt-mcp/token.json. It still omits what happens on failure, whether an existing token is overwritten, and how login state interacts with other xg_* tools.

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?

Three short sentences, front-loaded with the endpoint and followed by the captcha prerequisite and the credential-storage note. No filler, though the plaintext-password aside is parenthetical justification rather than actionable guidance.

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

Completeness3/5

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

For a login tool with no output schema, the description never says what a successful call returns or how errors surface, which an agent needs in order to sequence follow-up calls. The credential-persistence detail partially compensates by implying session establishment.

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 coverage is 100%, so all four parameters including code and uuid are already documented in the schema. The description only reiterates that the uuid comes from xg_login_captcha and that a captcha may be conditionally required, adding little beyond the structured fields.

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: local account/password login against the 学工系统 POST /login endpoint. The account-credential nature implicitly separates it from xg_login_browser and xg_login_token, but those siblings are never named, so the differentiation is left to inference.

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

Usage Guidelines3/5

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

Gives one concrete conditional workflow: when a captcha is required, call xg_login_captcha first to obtain the uuid. It does not state when to prefer this tool over the sibling login methods (browser/token) or what to do after a successful or failed login.

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