Skip to main content
Glama
yuque
by yuque

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

TableJSON Schema
NameRequiredDescriptionDefault
repo_idYesRepo ID or namespace (e.g., "mygroup/mybook")
toc_dataYesSingle-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".
Behavior3/5

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

With no annotations, the description bears full responsibility. It explains the TOC structure and actions but does not disclose whether updates are incremental or destructive, nor does it mention authorization needs or side effects. The detailed format helps but leaves behavioral gaps.

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 description is longer but each sentence provides essential details. It front-loads the purpose, then systematically explains parameters. Could be slightly more concise, but no redundant information.

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?

No output schema exists, and the description does not explain return values or error conditions. It covers usage well but lacks context on outcomes, prerequisites, or error handling, which is important for a mutation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions. The description adds significant value by explaining the JSON structure of toc_data in detail, including required fields, example, and the distinction between new and existing nodes, going beyond the schema's basic description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool updates the table of contents (TOC) for a repo/book, using a specific verb and resource. It is distinct from sibling tools like yuque_get_toc (read) and yuque_update_book (book metadata), providing no ambiguity.

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

Usage Guidelines4/5

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

The description gives detailed structure requirements for toc_data and examples, implicitly guiding usage. However, it lacks explicit when-to-use versus alternatives like yuque_update_book or yuque_update_doc, which handle different resources.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yuque/yuque-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server