Skip to main content
Glama

Damai Import Cookie

damai_import_cookie

Imports a Damai login cookie as a fallback sign-in method, validates it, and saves it locally so the MCP server can run logged-in ticket availability checks without uploading credentials.

Instructions

导入大麦登录 Cookie(后备登录方式):先在浏览器里登录大麦,再取 .damai.cn 的登录 Cookie 整串,如 cookie2=xxx; tb_token_=xxx(还可带 cna、t、damai.cn_user 等)。注意:大麦现在的登录里没有 SESSION 这个 Cookie。验证通过后保存在本机 ~/.maoyan-mcp/damai_auth.json(0600),不上传。注意:该登录验证尚未用真实登录测过,见 README。

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": "<cookie>"
    },
    "name": "damai_import_cookie"
  }
}

Input Schema

NameRequiredDescriptionDefault
cookieYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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 behavioral burden and does well: it discloses that the cookie is verified, persisted to ~/.maoyan-mcp/damai_auth.json with 0600 permissions, never uploaded, and warns the verification path is untested against a real login. It omits what happens on an invalid cookie (error vs. silent failure) and whether it overwrites existing stored auth.

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?

Purpose is front-loaded, followed by acquisition steps, storage/security facts, and a reliability caveat — each sentence carries distinct information. The two consecutive 注意 statements make it slightly list-like rather than tightly structured.

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 one-parameter, no-annotation mutation-of-auth-state tool with an output schema already covering return values, the description covers the how, the side effect location, the privacy posture, and a caveat about untested verification. Only failure-mode and overwrite semantics are left unaddressed.

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 coverage is 0% for the single `cookie` string, so the description must compensate, and it does: it gives the required format (cookie2=xxx; tb_token_=xxx), lists acceptable extra keys (cna, t, damai.cn_user), and preempts a common mistake by noting SESSION is no longer part of Damai login.

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+resource (导入大麦登录 Cookie) and qualifies it as the 后备登录方式, which implicitly separates it from the SMS-login sibling. It never names that sibling explicitly, so the differentiation is implied rather than stated.

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?

Gives clear when-to-use context (fallback login path) and concrete acquisition steps: log in via browser first, then copy the full .damai.cn cookie string. It stops short of an explicit 'use damai_login_with_sms when X, use this when Y' routing rule, so an agent must infer the fallback ordering.

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