Skip to main content
Glama

csdn-mcp

让 AI Agent 通过 MCP 协议管理 CSDN 博客:发布、查询、修改、删除、上传图片。

License: MIT Node.js CI MCP

30 秒快速开始

git clone https://github.com/Leaderxin/csdn-mcp.git
cd csdn-mcp
npm install
npm run build

然后把下面这段加进 MCP 客户端配置(args 必须是 dist/index.js绝对路径):

{
  "mcpServers": {
    "csdn": {
      "command": "node",
      "args": ["/absolute/path/to/csdn-mcp/dist/index.js"],
      "env": {
        "CSDN_COOKIE": "把整段 Cookie 粘到这里",
        "CSDN_LOG_LEVEL": "warn"
      }
    }
  }
}

CSDN_COOKIE 是唯一必填项,没有它任何写操作都会返回 AUTH_MISSING。获取方式见 docs/CONFIGURATION.md

Related MCP server: juejin-release-mcp

工具一览

11 个工具,全部走 stdio。参数、返回结构、错误码的完整定义见 docs/TOOLS.md

工具

说明

auth_login

运行期设置 Cookie,随后所有请求立即生效,无需重启进程

auth_status

检查当前 Cookie 是否已配置、格式是否合法、账号名是什么

publish_article

新建文章;mode 默认 draft,发布必须显式传 mode: "publish"

update_article

更新已有文章;改标题/标签/摘要/封面 + 草稿副本

get_article

按 ID 读取单篇文章,可选是否带正文

list_articles

列出文章;scope=published 只看已发布,scope=all 含草稿与分类计数

delete_article

删除文章,默认进回收站,permanent: true 彻底删除

upload_image

上传本地图片,返回公网 URL,分 cover / body 两条通道

list_categories

列出文章分类;接口不可用时回退到内置列表

list_tags

列出常用标签;接口不可用时回退到内置列表

verify_article

回查 API 状态 + 公开页 HTTP 码,确认文章真实状态

一次真实的 Agent 调用流程

用户:把这篇《MCP 协议入门》给我发成草稿,先别公开。

Agent → publish_article({
          "title": "MCP 协议入门",
          "markdown": "# MCP 协议入门\n\n...",
          "tags": ["MCP", "TypeScript"],
          "categories": "后端"
        })
← { "articleId": "149234567",
    "url": "https://blog.csdn.net/Leaderxin/article/details/149234567",
    "state": "draft",
    "verification": { "state": "draft", "statusCode": 2,
                      "publicStatusCode": 404, "consistent": true,
                      "message": "草稿状态与公开页一致(公开页 404)" } }

Agent → verify_article({ "article_id": "149234567", "expected": "draft" })
← { "articleId": "149234567", "state": "draft", "statusCode": 2,
    "publicStatusCode": 404, "consistent": true, "message": "..." }

用户:内容我看过了,发布吧。

Agent → update_article({ "article_id": "149234567", "mode": "publish" })
← { "articleId": "149234567",
    "url": "https://blog.csdn.net/Leaderxin/article/details/149234567",
    "state": "published" }

Agent → verify_article({ "article_id": "149234567", "expected": "publish" })
← { "articleId": "149234567", "state": "published", "statusCode": 1,
    "publicStatusCode": 200, "consistent": true, "message": "..." }

注意 publish_article 在步骤 1 里没有mode —— 默认就是草稿。只有用户在步骤 3 明确要求之后,Agent 才发出版本。原因见 docs/TOOLS.md

配置项

完整说明(含"什么时候需要改")见 docs/CONFIGURATION.md

变量

默认值

作用

CSDN_COOKIE

""

认证凭据。所有写操作的必填项

CSDN_USERNAME

""

Cookie 里没有 UserName 时使用

CSDN_LOG_LEVEL

warn

silent / error / warn / info / debug,日志走 stderr

CSDN_TIMEOUT_MS

20000

单次请求超时

CSDN_MAX_RETRIES

2

可重试失败的额外尝试次数

CSDN_MIN_INTERVAL_MS

250

普通请求之间的最小间隔

CSDN_SAVE_INTERVAL_MS

11000

写操作之间的最小间隔(CSDN 约 10s 内会拒绝)

CSDN_API_BASE

https://bizapi.csdn.net

bizapi 网关地址

CSDN_BLOG_BASE

https://blog.csdn.net

公开页地址,用于写后校验

CSDN_COMMUNITY_BASE

https://blog.csdn.net

社区列表接口地址

CSDN_USER_AGENT

Chrome 131 UA

请求头 User-Agent

CSDN_APP_KEY

203803574

bizapi 网关 app key(公开常量)

CSDN_APP_SECRET

9znpamsyl2c7cdrr9sas0le9vbc3r6ba

bizapi 网关签名密钥

它是怎么工作的

HMAC 签名。 所有走 bizapi.csdn.net 的请求都要带 X-Ca-Signature。签名串由 method、accept、content-type、x-ca-keyx-ca-nonce 和含查询串的 uri 按固定换行拼成,再做 base64(HMAC-SHA256(appSecret, stringToSign));同时必须带 X-Ca-Signature-Headers: x-ca-key,x-ca-nonce 告诉网关哪几个 header 参与了签名。少一行就是 401 HMAC signature does not match。完整格式见 docs/API-NOTES.md

两步图片上传。 先 POST /resource-api/v1/image/direct/upload/signature 拿上传凭据,再 multipart 直传到返回的存储 host,响应里的 data.imageUrl 才是公网地址。正文图和封面图是两条不同的通道(appName 不同),不可互换。见 docs/TOOLS.md

为什么每次写入都要回查公开页。 saveArticle 返回 200 不等于成功——v0 用 status: 0 表示草稿,CSDN 却把它当发布处理,用户拿到 200 的同时文章已经公开可见。所以 publish_article / update_article 默认跑一次校验:既看 API 返回的 status,也真的去请求一次公开页,只有两边都说"是草稿"(公开页 404)或都说"已发布"(公开页 200)才判定 consistent: true。任何一边不一致都会如实报告,不会因为一个 200 就宣称"发布成功"。

v0.1.0 到 v1.0.0 修了什么

  • 草稿状态码写反:v0 用 status: 0 当草稿,实际会被直接发布,且无法回退。v1 草稿是 status: 2 + pubStatus: 'draft',发布是 status: 1

  • 摘要字段大小写错误:v0 传小写 description,CSDN 只认大写 Description,摘要被静默丢弃。v1 传 Description,并且前置校验 ≤256 字。

  • 发完不自检:v1 每次写入都回查 getArticle.status 与公开页 HTTP 码。

  • 图片上传走已下线域名imgservice.csdn.net 全 404,v1 改走 resource-api/v1/image/direct/upload/signature 两步上传。

  • 入参不校验:v1 在发请求之前拦住 tags > 5、description > 256 字、空 markdown、非法 kind

  • 工具面缺失:从 4 个工具(其中 2 个接口已失效)补齐到 11 个,新增查询、编辑、删除、图片、状态校验能力。

  • 频控 / 重试 / 超时:内置客户端节流(写操作默认间隔 11s)与可重试错误的指数退避,网络抖动不再直接失败。

  • 错误不可读:v0 全部返回 code: -1 + 字符串;v1 改为命名错误码(AUTH_INVALIDRATE_LIMITEDVERIFY_FAILED 等)+ 可重试标记。

  • Cookie 可能进日志:v1 日志统一脱敏,且只写 stderr——stdout 属于 MCP 协议流。

文档

文档

内容

docs/README.md

文档索引

docs/GETTING-STARTED.md

从零到第一次成功调用

docs/TOOLS.md

11 个工具的参数、返回、错误码

docs/CONFIGURATION.md

环境变量 + 各客户端配置

docs/API-NOTES.md

逆向记录:签名串、saveArticle 字段、状态码

docs/TROUBLESHOOTING.md

按症状排查

docs/FAQ.md

常见问题与能力边界

docs/CHANGELOG.md

版本变更

docs/ARCHITECTURE.md

分层、模块边界、冻结的工具面

docs/KNOWN-ISSUES.md

v0.1.0 基线问题清单

许可

MIT,见 LICENSE

本项目派生自 mcp-csdn-publisher,上游版权声明按 MIT 的要求保留在 NOTICE。 (LICENSE 里只放本项目自己的标准 MIT 全文——掺进派生说明会让 GitHub 的许可证识别器匹配不上,仓库侧栏会显示成 Other。)

Available Tools

11 tools
auth_login设置 CSDN CookieA

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

ParametersJSON Schema
NameRequiredDescriptionDefault
cookieYes

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.

auth_status查看认证状态A

报告 Cookie 是否已配置、结构是否有效以及账号名,不发任何网络请求。它不判断 Cookie 是否被 CSDN 接受(那要联网),也不知道文章状态。需要更换 Cookie 时用 auth_login,不要靠反复调用本工具排查失效——失效只有联网调用才看得出来。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.8/5.0
Behavior5/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 so thoroughly: it states that no network request is sent, that it does not determine whether the Cookie is accepted by CSDN, and that it does not know article status. This prevents common misunderstandings about the tool's scope.

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?

The description is two sentences with no filler. It front-loads the tool's purpose, then adds limitations and usage guidance. Every sentence earns its place.

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 zero-parameter diagnostic tool, the description covers purpose, limitations, and routing to an alternative. It lacks an explicit return format example, but the reported fields are enumerated clearly, making the tool usable without additional context.

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?

The tool has zero parameters, so the baseline is 4. The description adds no parameter-specific semantics, but none are needed; the reported items (configuration, structure, account name) clarify what the tool inspects.

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 states a specific verb and resource: it reports whether the Cookie is configured, whether the structure is valid, and the account name. It also explicitly distinguishes itself from related tools by declaring it does not judge acceptance or know article status.

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 gives clear when-to-use guidance and names the alternative: use auth_login when replacing a Cookie, and do not use this tool to troubleshoot invalidation because that requires network calls. This is explicit and actionable.

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

delete_article删除文章A

删除一篇文章,默认进回收站(permanent=false,可在创作中心的回收站里恢复)。只有确认文章永远不该存在时才传 permanent=true——那是彻底删除,无法恢复。不要用它清理草稿以外的临时状态,也不要因为"想改标题"而删除重建:元数据直接改 update_article 就行,只有误发布的文章才必须走"删除后重建"这条路。

ParametersJSON Schema
NameRequiredDescriptionDefault
permanentNo
article_idYes

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It discloses the default recycle-bin behavior, recoverability, and the irreversibility of permanent=true. It also warns against misuse, which is essential for a destructive tool.

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?

The description is composed of three dense, purposeful sentences. It front-loads the default behavior, then covers the irreversible case, and finally gives exclusions and alternatives. Every sentence earns its place with no 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?

For a two-parameter delete operation with no annotations and no output schema, the description covers destructive behavior, parameter semantics, and alternatives comprehensively. It provides everything an agent needs to decide whether and how to call it correctly. Return-value details are not essential for understanding this tool.

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%, but the description compensates well for the permanent parameter by explaining both values and their consequences. article_id is not explicitly described, but its meaning is obvious from the tool name and the phrase 'delete an article.' This is a minor gap rather than a significant deficiency.

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 action: deleting an article, with a default soft-delete behavior and an optional permanent deletion mode. It explicitly distinguishes itself from update_article by explaining that title/metadata changes should not be handled by deleting and recreating. This is a specific verb+resource description with clear sibling differentiation.

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 provides explicit when-to-use and when-not-to-use guidance. It says permanent=true should only be used when the article should never exist, warns against using the tool for temporary states, and routes title changes to update_article. It also identifies the one legitimate delete-and-recreate scenario: mistakenly published articles.

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

get_article读取文章A

按 id 读取一篇文章的完整记录(草稿也能读到),这是确认 status 原始状态码、判断草稿/审核/发布的权威口径。文章很长时传 include_content=false,只取元数据、不返回正文,避免把上下文挤爆。想浏览已发布文章列表用 list_articles;想验证一次写入是否真的生效用 verify_article。

ParametersJSON Schema
NameRequiredDescriptionDefault
article_idYes
include_contentNo

TDQS

A4.7/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. It discloses that it reads drafts, returns the full record, and explains the effect of include_content. It does not explicitly state it is read-only, but this is implied. It does not mention error handling or authentication, but for a read tool these are minor omissions given the provided context.

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?

Three sentences, front-loaded with purpose, then parameter guidance, then alternatives. No fluff; every sentence contributes to correct usage.

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 description covers purpose, parameter behavior, and alternatives. It lacks details on error cases and authentication, but these are not critical for a simple read operation. With no output schema, it does not need to describe return structure.

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%, so the description must compensate. It explicitly explains include_content's purpose (metadata-only when false) and implies article_id's usage via '按 id 读取'. Both parameters are well clarified beyond the raw 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?

The description clearly states it reads a complete article record by id, specifies that drafts are included, and identifies it as the authoritative source for status codes. It distinguishes itself from siblings by naming list_articles and verify_article explicitly.

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?

It provides explicit when-to-use guidance: use list_articles for browsing published articles, verify_article for write verification, and advises setting include_content=false for long articles to avoid context overflow. This fully covers alternatives and conditional usage.

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

list_articles列出文章A

列出账号的文章。scope="published"(默认)走公开接口、不需要 Cookie,只含已发布文章;scope="all" 走作者后台接口、需要 Cookie,包含草稿,并在 counts 里给出 draft/publish 等分类计数——这是唯一能回答「我有哪些草稿」的口径(公开接口看不到草稿,get_article 又要先知道 id)。注意后台接口的每页条数由 CSDN 服务端固定,page_size 传入后可能被忽略,返回的 pageSize 是实际值。不要用它判断某篇文章是否发布成功——看不到不等于没发布,请用 verify_article。

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo
scopeNo
page_sizeNo

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description discloses critical behavior: public vs cookie-required backend access, server-side page-size enforcement, actual pageSize in response, draft counts behavior, and the limitation that 'not seen' does not mean 'not published'. This fully compensates for missing annotations.

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?

Dense but every clause adds operational value: scope defaults, cookie requirements, draft visibility, server page-size behavior, and exclusion of publish verification. Information is front-loaded and no filler exists.

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?

Given no output schema, the description still explains key response aspects (pageSize actual value, counts categories) and covers prerequisites, alternatives, and limitations. An agent has enough context to invoke and interpret the tool correctly.

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 carry parameter meaning. It thoroughly explains scope semantics and page_size being potentially ignored, but does not explicitly describe the page parameter, though its pagination meaning is standard and schema-enforced.

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?

Description starts with a specific '列出账号的文章' (lists account articles) and clearly separates the two scopes: published via public API and all via author backend. This distinguishes it from siblings like get_article and verify_article.

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?

Explicitly states when to use scope='all' (to see drafts) and why it is the only way to answer 'what drafts do I have', noting get_article requires an ID. It also explicitly says not to use it to verify publish success and directs to verify_article instead.

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

list_categories列出文章分类A

列出可用于 publish_article / update_article 的 categories 字段的分类名。CSDN 接口不可用时会降级返回内置列表(source=builtin)而不是报错,所以拿到 builtin 时要知道那不是账号的真实分类:先确认接口可用,或直接在 CSDN 创作中心里核对分类名。它不返回分类 id,也不需要 Cookie 之外的任何参数。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and handles it well: it discloses the fallback to a built-in list with source=builtin, warns that builtin does not reflect the account's real categories, states that no category id is returned, and notes the Cookie requirement. This is strong behavioral disclosure.

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?

Three sentences, each with a distinct job: purpose, fallback caveat, and result/parameter constraints. The most important purpose is front-loaded, and every sentence earns its place.

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?

The description is complete for a zero-parameter read tool: it explains what the return contains (category names, no ids), how to detect and handle degraded output (source=builtin), and when it should be consulted. No output schema exists, but the description provides enough operational context.

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?

With zero schema parameters, the baseline is already 4, and the description adds extra clarity by stating that no parameters are required beyond Cookie. It confirms the input surface for the agent in plain terms rather than leaving it inferable from an empty 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?

The description opens with a specific verb ('列出') and resource ('文章分类'), and states exactly what the result is for: the categories field in publish_article / update_article. This makes its role unambiguous and distinguishable from sibling tools like list_tags.

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 explicitly ties the tool to preparing publish_article / update_article requests and tells the agent how to handle the degraded builtin result (verify API availability or check the CSDN editor). It does not explicitly name alternatives or exclusion conditions, so it stops short of 5.

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

list_tags列出常用标签A

列出账号常用/推荐的标签,供 publish_article 的 tags 字段(每篇最多 5 个)挑选。接口不可用时会降级返回内置列表(source=builtin),那不是账号的真实标签,只是能用的候选。它不会创建标签,也不校验标签是否存在——CSDN 允许新标签,拼错的标签会原样出现在文章上。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description fully covers behavioral aspects: it may degrade to a builtin list (source=builtin), does not create tags, does not validate existence, and misspelled tags will appear as-is. This is more thorough than typical descriptions and covers critical side effects and data reliability.

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?

The description is efficient and well-structured: purpose first, then fallback behavior, then key caveats. Every sentence adds value without redundancy, and it is appropriately sized for the tool's simplicity.

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 zero-parameter tool without an output schema, the description is remarkably complete. It covers purpose, usage context, fallback, and behavioral caveats. The only minor omission is the exact return structure, but the mention of source=builtin and the clear intent make it sufficient.

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?

The tool has zero parameters, so the baseline is 4. The description correctly omits parameter details, and there is no schema coverage concern. It adds no misleading information about parameters.

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?

States a specific verb (列出), resource (账号常用/推荐的标签), and explicitly connects it to the publish_article tags field. It distinguishes itself from sibling tools by being the only tag-related tool, and clearly indicates its purpose of providing candidates.

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?

Provides clear context on when to use this tool (to select tags for publish_article, with a max of 5) and describes the fallback behavior when the interface is unavailable. However, it doesn't explicitly state alternatives or when not to use it, though no sibling tag tool exists to contrast with.

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

publish_article新建文章A

新建一篇文章并保存到 CSDN。mode 默认 draft(存草稿);显式传 mode=publish 才会公开发布,且发布后接口无法退回草稿——已发布的文章只能删除重建,所以想先审稿就保持默认。markdown 传源码(会渲染成 HTML 保存,原文同时保留);tags 最多 5 个;description 省略时按正文自动生成。不要用它更新已有文章(那会新建一篇),也不要传 mode=publish 来"试试能不能成功"——发布是不可逆的对外动作。

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNo
tagsNo
titleYes
verifyNo
markdownYes
categoriesNo
cover_imageNo
descriptionNo

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries full burden and discloses critical behaviors: default mode is draft, publish is irreversible and cannot revert to draft, published articles can only be deleted and recreated, markdown is rendered to HTML while retaining source, tags are capped at 5, and description is auto-generated when omitted. This goes well beyond basic 'create' semantics.

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?

The description is dense and information-rich, with the core purpose front-loaded and the most important warning about irreversibility placed early. Every sentence contributes either parameter semantics, behavioral warnings, or usage exclusions; there is no filler or repetition.

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?

Given no annotations, no output schema, and eight parameters, the description covers the most safety-critical aspects and common usage pitfalls thoroughly. It omits return-value behavior and a few parameter details, but the description provides sufficient context for an agent to invoke the tool correctly in the main workflows.

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. It adds meaning for mode (default draft, publish semantics), markdown (source stored and rendered), tags (max 5), and description (auto-generation). However, it does not explain verify, categories, or cover_image, leaving some parameters only minimally understood through the 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?

The description states a specific verb and resource: creating a new article and saving it to CSDN. It also explicitly distinguishes itself from updating existing articles ('不要用它更新已有文章(那会新建一篇)'), which differentiates it from the sibling update_article.

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 gives explicit when-to-use guidance: keep the default draft mode when review is needed. It also provides clear when-not-to-use exclusions: do not use it to update existing articles and do not pass mode=publish as a test, because publishing is irreversible.

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

update_article更新文章A

更新已有文章:只传要改的字段,未传的字段保持原值(saveArticle 会整条重写,所以未传的字段由本工具从当前记录合并回来)。已公开发布文章的线上正文(markdown)不会被接口更新:正文修改只写入草稿副本,需要在编辑器 UI 里重新发布才生效,工具会在返回里明确说明。不传 mode 时保持文章当前可见性(不会把已发布的文章退回草稿);想发布一篇草稿请显式传 mode=publish。不要用它校正正文之外的东西(那要重新发布),也不要传空字段试图"清空"某个值——省略即保持原值。

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNo
tagsNo
titleNo
markdownNo
article_idYes
categoriesNo
cover_imageNo
descriptionNo

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and handles it very well. It discloses that the underlying operation rewrites the whole record and merges omitted fields back, that published markdown is not updated by the API and only gets written to a draft copy, that the tool will state this in the return, and that omitted fields are preserved rather than cleared. These are exactly the non-obvious behaviors an agent needs to know before calling.

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 front-loaded with a strong one-sentence summary of the partial-update model, followed by the most important warning in bold. It is dense but every sentence adds behavioral or usage value. The implementation note about saveArticle rewriting the whole record is explanatory rather than redundant, though the paragraph is slightly long and could be broken into tighter points.

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 mutation tool with no annotations and no output schema, the description covers the major risks: merge behavior, the live-markdown exception, mode defaults, and the empty-field trap. It also mentions that the return will explicitly state the published body outcome. It does not mention authentication/permission requirements or explicitly clarify what mode=draft does to a published article, which keeps it just short of 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 add meaning beyond field names and types. It does so by explaining the update contract across all parameters: only pass fields to change, omitted fields keep their original value, empty fields do not clear values, and mode has special default and publish-draft semantics. It does not provide per-field business meaning for title, tags, categories, cover_image, or description, but their names and schema constraints make them fairly self-explanatory.

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 opens with '更新已有文章' (update existing article), naming a clear verb and resource, then immediately defines partial-update semantics: only changed fields need to be passed and unpassed fields retain their current values. It also calls out the surprising markdown behavior for published articles, which differentiates this tool from a simple 'edit article' sibling. The scope is unambiguous.

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?

The description gives explicit when-not guidance: do not pass empty fields to clear values, do not use this tool to correct live body content, and explicitly says omitting mode preserves current visibility while passing mode=publish publishes a draft. It does not name alternative sibling tools such as publish_article or get_article directly, but the behavioral instructions are specific enough for an agent to choose correctly in most cases.

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

upload_image上传图片A

把本地图片上传到 CSDN 图床,返回公网 URL(正文里请写这个绝对 URL,CSDN 有防盗链)。kind 决定通道:封面图用 cover,正文图用 body,两条通道不通用。不要用它上传非图片文件(仅支持 jpg/jpeg/png/gif/webp/bmp);也不要拿返回的 key 当图片地址用,那不是公网地址。

ParametersJSON Schema
NameRequiredDescriptionDefault
kindYes
pathYes

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses the return value (public URL), the anti-leech behavior requiring the absolute URL, and the non-interchangeability of channels. It also warns about the key not being a public address. However, it omits auth requirements and error handling, which are relevant for a tool that uploads data, though the sibling auth tools suggest authentication is expected.

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?

The description is compact and front-loaded with the core purpose and output. It delivers essential usage instructions and warnings in a few sentences without redundancy. Every sentence adds value, covering purpose, channel selection, and exclusions.

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?

Given the tool's simplicity (two parameters, no output schema), the description covers the main behavioral expectations: what it does, what it returns, and what to avoid. It lacks explicit auth prerequisites and response format details, but these are partially implied by sibling tools and the clear output statement. Overall, it is sufficiently complete for an agent to invoke correctly in most scenarios.

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 coverage is 0%, so the description must compensate. It explains 'kind' (cover vs body) and implies 'path' refers to the local image file, but does not specify path format (absolute/relative), file size limits, or other constraints. While it adds meaning beyond the enum, the path parameter remains underspecified, leaving the agent to infer from the tool name and context.

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 (upload local image to CSDN image hosting) and its primary output (public URL). It also differentiates from sibling tools by specifying the kind-based channel selection (cover vs body), which is unique among the listed siblings that are all article-related.

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?

Provides explicit usage guidance: instructs to use the returned absolute URL in article content due to anti-leech, explicitly states not to use it for non-image files, and warns against using the returned key as an image address. It also clarifies that cover and body channels are not interchangeable, giving clear conditions for when to use which.

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

verify_article校验文章真实状态A

回查一篇文章的真实状态:CSDN 接口的 status + 公开页的 HTTP 码,两个信号都看,缺一不可(只看接口会漏判,只看公开页会把审核中误判成失败)。expected 省略时按当前状态推断。它是只读的,不会修改任何东西;也不是必须的步骤——publish_article / update_article 已经默认自检,重复调用只会多花两次请求。

ParametersJSON Schema
NameRequiredDescriptionDefault
expectedNo
article_idYes

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does it well. It discloses that the tool is read-only, modifies nothing, requires two signals (interface status and HTTP code) to avoid misjudgments, and notes the failure modes of relying on only one signal. This is rich behavioral context beyond the bare tool name and schema.

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?

The description is compact and information-dense: three sentences cover purpose, verification logic, read-only nature, and usage trade-offs. Every sentence earns its place, and the core purpose is front-loaded.

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?

Given no annotations, no output schema, and only two parameters, the description provides a strong operating picture: what it checks, why both signals matter, what happens when expected is omitted, and when it is unnecessary. The main omission is the exact return/output format, but an agent can likely infer the result from the verification purpose.

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 0%, so the description must compensate. It does clarify that 'expected' is optional and that when omitted the tool infers based on current state, but it does not fully explain the semantic meaning of 'expected' (e.g., expected status used for comparison). 'article_id' is trivially inferable as the article identifier, but the description adds little parameter-specific detail.

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 states a specific verb ('回查'/verify), a clear resource (a single article), and a concrete method (CSDN interface status + public page HTTP code). It also differentiates itself from sibling tools by explaining that publish_article and update_article already perform self-checks, so this tool is supplemental rather than required.

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?

It explicitly explains when not to use the tool: publish_article and update_article already default to self-checking, and repeated verification only wastes two requests. It also identifies the alternatives by name and clarifies the trade-off, giving an agent clear routing guidance.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 11 tool updatesv1.0.1
    • First observedauth_login
    • First observedauth_status
    • First observeddelete_article
    • First observedget_article
    • First observedlist_articles
    • First observedlist_categories
    • First observedlist_tags
    • First observedpublish_article
    • First observedupdate_article
    • First observedupload_image
    • First observedverify_article

TDQS

A4.7/5.0

Scored across 11 tools

Disambiguation5/5

Each tool targets a distinct action-resource pair: auth tools handle authentication state, article tools cover lifecycle (publish/update/get/list/delete/verify), and auxiliary tools handle images and metadata. Descriptions explicitly warn against common misuses (e.g., publish_article vs update_article), eliminating ambiguity.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern (auth_status, list_tags, publish_article, upload_image, etc.), with each verb clearly indicating the action. There is no mixing of conventions or vague verbs.

Tool Count5/5

11 tools is well within the ideal range for a domain-specific server, covering authentication, article CRUD, listing, verification, image upload, and metadata lookup without unnecessary bloat. Each tool earns its place in the workflow.

Completeness5/5

The tool set provides full lifecycle coverage for articles (create, read, update, delete, list, verify), plus image upload and metadata retrieval (tags/categories). Authentication is handled comprehensively. The only limitation is an inherent CSDN API constraint, not a missing tool.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers