Skip to main content
Glama

设置 CSDN Cookie

auth_login

Set or update the CSDN authentication cookie for all subsequent requests. Validates cookie structure locally, returning errors for missing UserToken or UserName. Use only when initializing or after cookie expiration.

Instructions

在运行期设置/更新 CSDN Cookie(整段 Cookie 头),设置后立即对所有后续请求生效,不需要重启 MCP 进程。结构校验完全在本地完成:缺少 UserToken 或 UserName 时直接返回原因,不发任何请求。仅在首次配置或 Cookie 失效后才需要调用;只想知道当前状态请用 auth_status(不发网络请求)。它不判断 Cookie 是否被 CSDN 接受——结构合法但已经失效的 Cookie,只有后续需要登录的调用才会暴露。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cookieYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.9/5.0
Behavior5/5

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

无 annotations,因此描述承担了全部行为披露责任,且做得非常充分。它说明了设置后立即生效、不需要重启进程、本地结构校验不发请求、不判断 Cookie 是否被 CSDN 接受、失效 Cookie 何时暴露等关键行为特征。

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

四句话没有冗余信息,主操作、使用条件、替代工具、行为限制各占一句,结构清晰且重要信息前置。没有浪费任何文字。

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?

对只有一个参数、无输出 schema 的简单设置型工具,描述覆盖了使用方法、校验规则、使用时机、替代工具和已知局限。agent 据此可以正确决定何时调用以及如何构造参数。

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 覆盖率为 0%,且只有一个 cookie 字符串参数,描述补充了关键语义:必须是'整段 Cookie 头',且缺少 UserToken 或 UserName 会被本地校验拒绝。这超越了 schema 本身提供的信息,虽未给出示例格式,但对单参数工具已足够。

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?

描述以明确的动词和资源开头('在运行期设置/更新 CSDN Cookie'),并说明作用范围是整段 Cookie 头。它还通过指向 auth_status 来区分自己,agent 无需打开 schema 即可理解该工具与状态查询工具的不同。

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?

明确说明使用时机:'仅在首次配置或 Cookie 失效后才需要调用',并直接给出替代工具:'只想知道当前状态请用 auth_status(不发网络请求)'。这既说明了何时使用,也说明了何时不使用时改用其他工具。

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