Skip to main content
Glama
xjtlu-library-mcp

xjtlu-library-mcp

by seally-web

save_library_cookie

Saves library login cookies for off-campus access by storing a pasted browser Cookie header or Netscape cookies.txt locally; re-paste a fresh value when the session expires.

Instructions

保存登录态,用于校外访问。粘浏览器里的 Cookie 请求头或 Netscape cookies.txt 内容。

获取方法:浏览器登录 lib.xjtlu.edu.cn 后打开开发者工具 → Network → 任一请求 → 复制 Request Headers 里的 Cookie 值(形如 "JSESSIONID=...; elinkid=...")。 这会写入本机 state/cookies.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": {
      "cookie_string": "<cookie_string>"
    },
    "name": "save_library_cookie"
  }
}

Input Schema

NameRequiredDescriptionDefault
cookie_stringYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.3

TDQS

A4/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 does well: it discloses that the cookie is written to local state/cookies.json, that nothing is uploaded, and what to do when the cookie expires. It omits failure behavior (e.g. what happens if the pasted cookie is invalid) and any security caution about handling credentials.

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 description front-loads purpose and format, then the retrieval steps, then the storage/expiry note. Every section is useful, though the multi-line devtools walkthrough is slightly verbose for a one-parameter tool.

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?

For a single-parameter local-write tool with no output schema, the description covers format, provenance, storage location, and expiry handling. It could add a one-line note on confirming success or on invalid-cookie handling to be fully complete.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate, and it does: it tells the agent the parameter accepts either a raw Cookie request header value (with the JSESSIONID=...; elinkid=... shape) or Netscape cookies.txt contents. That is a meaningful format specification beyond the bare 'Cookie String' title.

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 names a specific verb+resource (save the library login cookie) and states the purpose it serves: off-campus access. It clearly differs from save_exam_session by naming the target site lib.xjtlu.edu.cn, though it does not explicitly contrast itself with sibling tools.

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 clear when-to-use context (off-campus access) and even a step-by-step retrieval procedure through browser devtools plus instructions to re-paste after the cookie expires. There is no explicit 'when not to use' or named alternative, which keeps it from a 5.

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