yuque_update_toc
Create, move, edit, or delete nodes in a Yuque repository's table of contents. Deletion requires confirm='DELETE'.
Instructions
Update repo TOC (create/move/edit/delete nodes). ⚠️ Deleting requires confirm='DELETE'. PUT /repos/:id/toc. 详见 references/api/toc_api.md
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Node URL (required for creating link, optional for edit) | |
| type | No | Node type: DOC, LINK, TITLE (required for create, optional for edit) | |
| title | No | Node title (required for creating group/link, optional for edit) | |
| action | Yes | Action type (required): appendNode, prependNode, editNode, removeNode | |
| book_id | Yes | Repository ID or namespace (required) | |
| confirm | No | Confirmation token. Must be set to the exact string 'DELETE' to proceed. This is a safety guard against accidental deletion. | |
| doc_ids | No | Document ID array, e.g. [123,456] (required for creating doc nodes) | |
| visible | No | Visible: 0=hidden, 1=visible (default 1) | |
| node_uuid | No | Target node UUID (required for move/edit/delete) | |
| action_mode | Yes | Action mode (required): sibling, child | |
| open_window | No | Open in new window: 0=same page, 1=new window (optional for links, default 0) | |
| target_uuid | No | Target node UUID, defaults to root if omitted |