Skip to main content
Glama
xjtlu-library-mcp

xjtlu-library-mcp

by seally-web

browser_login

Opens a Chrome login page for XJTLU ETD sign-in; after authentication, it captures and stores the token and cookie needed by the library MCP server.

Instructions

开一个 Chrome 窗口让你登录,登录完成后自动把 token 和 cookie 抓进来存好。

不用复制粘贴任何东西:窗口里是真实的 etd.xjtlu.edu.cn 登录页,你自己输账号密码 (插件不碰密码),登录成功后它读同一次登录产生的 localStorage.token 与 XJTLU_UserInfo cookie,写进 ~/.xjtlu-library-mcp/state/etd.json,然后把窗口关掉。

用的是独立 profile(~/.xjtlu-library-mcp/state/chrome-profile),不碰你日常浏览器的 登录状态;但因为 profile 会被保留,下次多半能免登录直接抓到。

超时后窗口不会关——在里面把登录做完,再调一次本工具即可(会复用同一个窗口)。

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": "browser_login"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeout_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full disclosure burden and does so richly: it states the plugin never touches the password, that it reads localStorage.token and the XJTLU_UserInfo cookie from that same login, writes to ~/.xjtlu-library-mcp/state/etd.json, closes the window, and uses an isolated profile at ~/.xjtlu-library-mcp/state/chrome-profile that does not disturb the daily browser. It also discloses the side effect that the persisted profile makes future logins likely to be skipped.

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?

The purpose is front-loaded in the first sentence, and the following paragraphs each add distinct facts: credential handling, storage paths, profile isolation, and timeout recovery. A few phrases restate the same idea (no copy-paste, the plugin does not touch the password), but overall the structure is tight for the amount of behavior being disclosed.

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

Completeness5/5

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

For a single-parameter interactive-login tool with no annotations and no output schema, the definition covers everything an agent needs: prerequisites (a human at the keyboard), what is written and where, isolation from the personal browser, and how to recover from a timeout. Only the exact success response is unspecified, which is minor.

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?

There is one parameter (timeout_seconds) with 0% schema description coverage, so the baseline would be low, but the prose does explain timeout behavior — the window is not closed on timeout and a re-invocation reuses the same window. It still never ties that behavior to the timeout_seconds parameter, states units or default, or says what a successful return looks like, leaving a gap the schema cannot fill.

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?

The description opens with a concrete verb and outcome: it launches a Chrome window so the human can log in, then captures the token and XJTLU_UserInfo cookie and saves them to etd.json. The line '不用复制粘贴任何东西' implicitly separates it from a manual cookie-saving sibling, but no sibling is named outright, so an agent must infer that distinction.

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?

It gives a clear situation for use (interactive login against etd.xjtlu.edu.cn) and a recovery path: on timeout the window stays open, finish logging in and call the tool again to reuse the same window. It does not name alternatives such as browser_login_status for checking login state, so an agent has context but no explicit routing.

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