Skip to main content
Glama

yuque_update_toc

Update a Yuque repository's table of contents by creating, moving, editing, or deleting TOC nodes, with a confirmation guard for deletion.

Instructions

Update repo TOC (create/move/edit/delete nodes). ⚠️ Deleting requires confirm='DELETE'. For removeNode: action_mode=sibling deletes only the node, child deletes the node and all its children. PUT /repos/:id/toc. 详见 references/api/toc_api.md

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>",
      "action": "<action>",
      "action_mode": "<action_mode>"
    },
    "name": "yuque_update_toc"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoNode URL (required for creating link, optional for edit)
typeNoNode type: DOC, LINK, TITLE (required for create, optional for edit)
titleNoNode title (required for creating group/link, optional for edit)
actionYesAction type (required): appendNode, prependNode, editNode, removeNode
book_idYesRepository ID or namespace (required)
confirmNoConfirmation token. Must be set to the exact string 'DELETE' to proceed. This is a safety guard against accidental deletion.
doc_idsNoDocument ID array, e.g. [123,456] (required for creating doc nodes)
visibleNoVisible: 0=hidden, 1=visible (default 1)
node_uuidNoTarget node UUID (required for move/edit/delete)
action_modeYesAction mode (required): sibling | child. For removeNode: sibling = delete this node only, child = delete this node and all its children
open_windowNoOpen in new window: 0=same page, 1=new window (optional for links, default 0)
target_uuidNoTarget node UUID, defaults to root if omitted

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.0.0
    • changedInput schema / properties / action_mode / description
      Previous value: -"Action mode (required): sibling, child"New value: +"Action mode (required): sibling | child. For removeNode: sibling = delete this node only, child = delete this node and all its children"
  2. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations present, the description carries the behavioral burden and does substantial work: it discloses that deletion requires the exact token confirm='DELETE' and that action_mode=child performs a cascading delete including all children. What is missing is anything about permission requirements, reversibility, or whether edits to a parent affect child ordering — gaps that matter for a destructive-capable mutation.

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 key hazard — the DELETE confirmation and the child-cascade behavior — is front-loaded within two short sentences, which is good structure. Minor noise comes from the embedded endpoint string and the Chinese-language reference pointer, which add bulk without adding instruction.

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 12-parameter destructive mutation with no annotations and no output schema, the description covers the most dangerous semantics (confirmation token, cascading delete) and the action taxonomy. It is slightly thin on the create path (doc_ids vs url vs title requirements) and on return/response behavior, but the schema covers per-parameter requirements, so an agent can call this correctly in most cases.

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%, so the schema already documents every one of the 12 parameters, including the confirm token and the sibling/child action_mode distinction. The description largely restates those semantics rather than adding new meaning (e.g., it never explains the difference between appendNode and prependNode or when target_uuid is required for moves). Baseline 3 is appropriate.

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?

The description names a specific resource and verb ("Update repo TOC") and immediately enumerates the mutation categories (create/move/edit/delete nodes), so an agent knows exactly what domain this touches. It falls short of a 5 because it never distinguishes itself from the sibling batch tool `yuque_batch_update_toc` or the read-only `yuque_get_toc`, leaving the agent to infer which one to pick.

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?

Usage context is implied through the action list and the deletion warning, and the action_mode explanation tells the agent how to choose between sibling and child deletes. However, there is no explicit when-to-use / when-not-to-use guidance relative to `yuque_batch_update_toc`, and no statement of prerequisites (e.g., needed scopes or whether book_id must be ownable).

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