Skip to main content
Glama

新建文章

publish_article

Create and save a new CSDN blog article as a draft or published post, with automatic local image upload to the CSDN CDN and support for up to five tags.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo
tagsNo
titleYes
verifyNo
markdownYes
read_typeNo
categoriesNo
cover_imageNo
descriptionNo
scheduled_atNo定时发布时间(ISO 8601,需配合 mode=publish)。实验特性:线上单位未验证,见 docs/API-NOTES.md
upload_local_imagesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.0.4
    • addedInput schema / properties / read_type
      Added value: +{
      +  "enum": [
      +    "public",
      +    "private"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / scheduled_at
      Added value: +{
      +  "description": "定时发布时间(ISO 8601,需配合 mode=publish)。实验特性:线上单位未验证,见 docs/API-NOTES.md",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / upload_local_images
      Added value: +{
      +  "type": "boolean"
      +}
  2. First observedv1.0.1

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 well: it discloses the default mode, that publish is irreversible ('发布后接口无法退回草稿——已发布的文章只能删除重建'), a side effect (local images auto-uploaded to CSDN CDN, with the flag to disable it), and the tags/description auto-derivation rules. These are exactly the behavioral traits an agent needs before mutating external state.

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 highest-risk facts (default draft, irreversibility of publish) are front-loaded before the mechanics. Despite being a single dense paragraph, each clause carries load-bearing information with no filler.

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 an 11-parameter, no-annotation, no-output-schema mutation tool it covers the risky defaults, side effects, and irreversibility thoroughly. It falls short only on the secondary parameters that remain unexplained anywhere.

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 only 9%, so the description must compensate, and it explains mode, markdown, tags (max 5), description, and upload_local_images with real semantics. However, several parameters (verify, read_type, categories, cover_image) are left undocumented in both schema and description, so the compensation is incomplete.

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 concrete verb+resource ('新建一篇文章并保存到 CSDN') with the scope of what gets written. It also explicitly separates itself from the sibling update_article ('不要用它更新已有文章(那会新建一篇)'), so an agent can route correctly without opening other schemas.

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?

Gives explicit when-to-use guidance ('想先审稿就保持默认'), names the alternative path (update_article for existing articles), and warns against misuse ('不要传 mode=publish 来试试'). Both the when and the when-not are stated.

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