yuque_update_toc
Update the table of contents of a Yuque repository by appending or moving nodes using a JSON operation object.
Instructions
Update the table of contents (TOC) for a repo/book. The toc_data must be a single-operation JSON object (not an array). Required fields: "action" (e.g. "appendNode"), "action_mode" ("child" or "sibling"), "target_uuid" (empty string for root level). For new nodes: include "type" ("TITLE" or "DOC") and "title". To move existing nodes: use "node_uuid" instead. Example: {"action":"appendNode","action_mode":"child","target_uuid":"","type":"TITLE","title":"New Section"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_id | Yes | Repo ID or namespace (e.g., "mygroup/mybook") | |
| toc_data | Yes | Single-operation JSON object. Must include "action" (e.g. "appendNode"), "action_mode" ("child"|"sibling"), "target_uuid" (empty string = root). For new nodes add "type"+"title"; to move existing nodes use "node_uuid". |