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
| 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. For removeNode: sibling = delete this node only, child = delete this node and all its children | |
| 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 |