Skip to main content
Glama

更新文档(需开启写入)

yuque_update_doc
Destructive

Updates an existing Yuque document's title or Markdown body; write access requires YUQUE_ALLOW_WRITE=1.

Instructions

更新已有文档的标题或 Markdown 正文。默认禁用,需 YUQUE_ALLOW_WRITE=1。

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": {
      "book_id": "<book_id>",
      "doc": "<doc>"
    },
    "name": "yuque_update_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
docYes文档 slug 或 id
bodyNo新的 Markdown 正文
titleNo新标题
book_idYes文档所在知识库 id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

The annotations already flag destructiveHint=true and openWorldHint=true, and the description adds a genuinely new behavioral fact the annotations do not carry: the tool is disabled by default and requires the YUQUE_ALLOW_WRITE=1 environment flag. It still does not say whether omitting title or body leaves that field untouched, which matters for a destructive write.

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?

Two short sentences, with the action front-loaded and the enablement constraint immediately after. Nothing is wasted and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive four-parameter mutation with no output schema, the definition covers purpose and the write gate but omits what the agent most needs: whether the update is partial or replaces the whole body, and what is returned on success. Adequate, but with a clear gap.

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% and every parameter (doc, body, title, book_id) is documented inline, so the schema does the heavy lifting. The description only loosely echoes the fields ('标题或 Markdown 正文') without adding format or optionality semantics, so the baseline 3 applies.

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 and resource ('更新已有文档') plus the two mutable fields (标题 / Markdown 正文), which is enough to distinguish it from yuque_create_doc and the read-only getters. It stops short of explicitly naming the sibling it contrasts with, so it lands just under a 5.

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

Usage Guidelines3/5

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

The word '已有' implies this is for existing documents only, and the YUQUE_ALLOW_WRITE=1 prerequisite tells the agent when the call will fail. But there is no explicit 'use create_doc for new documents' routing or guidance on partial vs. full updates.

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