Skip to main content
Glama
xinayida
by xinayida

lanhu_set_cookie

Set the Lanhu authentication cookie manually when automatic refresh fails, persisting it to ~/.lanhu/cookie for server access. Provide the full cookie string containing session and user_token.

Instructions

设置蓝湖认证 Cookie(并持久化到 ~/.lanhu/cookie)。

一般无需手动调用:Cookie 文件由 scripts/refresh_cookie.py 自动维护, MCP 启动时自动读取。仅在自动刷新不可用时,才需要从浏览器手动复制: DevTools → Network → 任一 lanhuapp.com 请求 → Request Headers → 复制完整 Cookie 头(须含 session 和 user_token)→ 传给本工具。 设置后可调用 lanhu_get_teams 验证是否生效。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cookieYes浏览器 Cookie 字符串,必须包含 session 和 user_token 两项,例如: session=.eJy...; user_token=eyJ...
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it delivers: it discloses that the cookie is persisted to ~/.lanhu/cookie, that scripts/refresh_cookie.py auto-maintains the file, and that MCP reads it at startup. It also tells the agent that the cookie must contain session and user_token and that verification via lanhu_get_teams is recommended. It does not explicitly state failure behavior or overwriting semantics, but the main side effect (persistence) is transparent.

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 is split into clear sections: purpose, default state, fallback trigger, copy steps, and verification. While slightly long, each sentence serves a purpose for a manual fallback tool; the key constraint (only when auto-refresh fails) is front-loaded. No filler words or tautology.

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?

The tool is a simple one-parameter setter with no output schema or annotations, and the description covers its role, the condition for use, parameter source, and a verification step. It omits explicit return-value or error-handling details, but for setting a cookie the operational context is sufficiently complete. The reference to lanhu_get_teams closes the feedback loop.

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 description coverage is 100%; the cookie parameter is already described as a browser Cookie string that must contain session and user_token with an example. The description merely repeats the requirement and adds sourcing instructions (DevTools → Network), which is procedural guidance rather than new semantic parameter meaning. Baseline 3 is appropriate.

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

Purpose5/5

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

The description clearly states the tool's action: '设置蓝湖认证 Cookie' (set Lanhu authentication cookie) and specifies persistence to ~/.lanhu/cookie. The verb and resource are specific, and it is self-evidently distinct from all sibling getters/search tools. It also frames the tool as a fallback, which helps disambiguate its role.

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

Usage Guidelines5/5

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

The description explicitly says '一般无需手动调用' (generally no need to call manually) and defines the exact condition for use: '仅在自动刷新不可用时' (only when auto-refresh is unavailable). It provides concrete browser-copy steps and recommends calling lanhu_get_teams to verify, giving the agent a clear when-to-use and post-condition check.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xinayida/lanhu-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server