yuque-ai-mcp

v4.0.1
yuque-ai-mcp Checked 2 hours ago Published 10 days ago

Yuque MCP Server — 65 tools (Yuque OpenAPI coverage + 20 web-API tools requiring browser session cookie)

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

yuque_get_user

Get current user profile (id,login,name,avatar_url,books_count,description,created_at). GET /user. 详见 references/api/user_api.md

ParameterTypeDescription
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_hello

Health check — verify Yuque API token validity. GET /hello. 详见 references/api/user_api.md

yuque_get_user_groups

List groups the user belongs to. GET /users/:id/groups. 详见 references/api/user_api.md

ParameterTypeDescription
id *stringUser login or ID (required)
offsetnumberPagination offset, default 0
rawbooleanReturn raw full JSON (default false, returns trimmed fields)
rolenumberRole filter: 0=admin, 1=member

yuque_get_group_users

List group members (page size 100). Supports role filter (0=admin,1=member,2=readonly). GET /groups/:login/users. 详见 references/api/group_api.md

ParameterTypeDescription
login *stringGroup login or ID (required)
offsetnumberPagination offset, default 0
rawbooleanReturn raw full JSON (default false, returns trimmed fields)
rolenumberRole filter: 0=admin, 1=member, 2=readonly

yuque_update_group_user

Change a group member role (0=admin,1=member,2=readonly). PUT /groups/:login/users/:id. 详见 references/api/group_api.md

ParameterTypeDescription
id *stringUser login or ID (required)
login *stringGroup login or ID (required)
rawbooleanReturn raw full JSON (default false, returns trimmed fields)
rolenumberRole: 0=admin, 1=member, 2=readonly (default 1)

yuque_delete_group_user

Remove a member from a group. ⚠️ Requires confirm='DELETE'. DELETE /groups/:login/users/:id. 详见 references/api/group_api.md

ParameterTypeDescription
confirm *stringConfirmation token. Must be set to the exact string 'DELETE' to proceed. This is a safety guard against accidental deletion.
id *stringUser login or ID (required)
login *stringGroup login or ID (required)
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_list_docs

List documents in a repo, sorted by updated_at desc. limit ≤ 100. Supports deleted (recycle view) and changed_at_gte (incremental sync). GET /repos/:id/docs. 详见 references/api/doc_api.md

ParameterTypeDescription
book_id *stringRepository ID (numeric) or namespace like group/book_slug (required)
changed_at_gtestringOnly return docs changed at/after this ISO 8601 time (incremental sync), e.g. 2026-10-16T00:00:00Z
deletedbooleanReturn the deleted-docs view (default false). ⚠️ Yuque treats the mere presence of this param as truthy, so it is only sent when true; response items carry deleted_at / deleted_slug
limitnumberPage size, max 100, default 100
offsetnumberPagination offset, default 0
optional_propertiesstringExtra fields, comma-separated. Supports: hits, tags, latest_version_id
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_create_doc

Create a document in a repo. 传 parent_uuid 则挂到指定节点下,不传默认挂根目录。POST /repos/:id/docs. 详见 references/api/doc_api.md

ParameterTypeDescription
body *stringDocument body content (required)
book_id *stringRepository ID (numeric) or namespace like group/book_slug (required)
formatstringContent format: markdown / html / lake, defaults to markdown
parent_uuidstringTOC parent node UUID. 指定后新文档挂到该节点下。不传默认挂根目录。
publicnumberVisibility: 0=private, 1=public, 2=team-public, defaults to repo setting
rawbooleanReturn raw full JSON (default false, returns trimmed fields)
slugstringDocument slug. Rule: kebab-case, lowercase, no special chars. Auto-generated if omitted.
titlestringTitle, defaults to 'Untitled'

yuque_get_doc

Get document detail (body/body_html). Sheet/Table docs and body_lake/body_draft need raw=true. Supports id or slug. GET /repos/docs/:id. 详见 references/api/doc_api.md

ParameterTypeDescription
id *stringDocument ID (numeric) or slug (required)
book_idstringRepository ID or namespace (optional; required when id is a slug)
pagenumberTable page number, ≥1, default 1
page_sizenumberTable page size, 1-200, default 100
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_update_doc

Update a document title/body/slug/format/public. PUT /repos/:id/docs/:id. 详见 references/api/doc_api.md

ParameterTypeDescription
book_id *stringRepository ID (numeric) or namespace like group/book_slug (required)
id *stringDocument ID or slug (required)
bodystringDocument body content
formatstringContent format: markdown / html / lake
publicnumberVisibility: 0=private, 1=public, 2=team-public
rawbooleanReturn raw full JSON (default false, returns trimmed fields)
slugstringDocument slug
titlestringTitle

yuque_delete_doc

Delete a document (moves to recycle bin). ⚠️ Requires confirm='DELETE'. DELETE /repos/:id/docs/:id. 详见 references/api/doc_api.md

ParameterTypeDescription
book_id *stringRepository ID (numeric) or namespace like group/book_slug (required)
confirm *stringConfirmation token. Must be set to the exact string 'DELETE' to proceed. This is a safety guard against accidental deletion.
id *stringDocument ID or slug (required)
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_get_doc_versions

List document version history (last 100 published versions). GET /doc_versions?doc_id=:id. 详见 references/api/doc_api.md

ParameterTypeDescription
doc_id *string | numberDocument ID (required). number 或数字字符串都接受
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_get_doc_version_detail

Get version detail (format/body/body_md/body_html/body_asl/diff + meta). Fields over 20000 chars are truncated — pass raw=true for the full payload. GET /doc_versions/:id. 详见 references/api/doc_api.md

ParameterTypeDescription
id *string | numberVersion ID (required). number 或数字字符串都接受
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_embed_url

Generate a Yuque embed reader URL from a document link or doc_id+book_id. 详见 references/api/extended_api.md

ParameterTypeDescription
from *stringCaller app name (required). Use your team/app English name
book_idstringRepository ID or namespace (e.g. yuque/developer), used with doc_id
doc_idstringDocument ID (mutually exclusive with url, requires book_id or namespace)
outlinenumberShow outline sidebar: 1=show, 0=hide
titlenumberShow title: 1=show, 0=hide
translatestring翻译语种,支持:en/zh/ru/pt/es/fr/ja/ar/de/it/ko/tr/vi/pl/he/id/hi/nl/th
urlstringFull Yuque document URL, e.g. https://www.yuque.com/yuque/developer/embed (mutually exclusive with doc_id+book)

yuque_batch_get_docs

Batch get document details (concurrent GET, read-only, max 20). 详见 references/api/doc_api.md

ParameterTypeDescription
book_id *stringRepository ID (numeric) or namespace like group/book_slug (required, shared for all docs)
ids *arrayDocument IDs as array, e.g. [123,456] or ["slug-a","slug-b"] (required, max 20)
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_export_doc

Export a single document as Markdown file. Fetches doc → converts body_html to Markdown → adds frontmatter → writes to disk. Resource download is separate (yuque_export_resources). 详见 references/api/extended_api.md

ParameterTypeDescription
id *string | numberDocument ID or slug (required). number 或字符串都接受
output_dir *stringOutput directory path (required). The file will be saved as <output_dir>/<title>.md
book_idstringRepository ID or namespace (recommended when using slug)
raw_bodybooleanUse raw body field instead of converting body_html to markdown (default false). Useful for markdown-format docs.

yuque_export_resources

Download images/attachments from a document to local directory. Extracts resource URLs from body_html, downloads to <output_dir>/images/ and <output_dir>/attachments/, returns URL→local_path mapping. 详见 references/api/extended_api.md

ParameterTypeDescription
id *string | numberDocument ID or slug (required). number 或字符串都接受
output_dir *stringOutput directory path (required). Resources saved to <output_dir>/images/ and <output_dir>/attachments/
book_idstringRepository ID or namespace (recommended when using slug)

yuque_copy_doc

Copy a single document to another repo. Agent fetches source via yuque_get_doc, cleans content, then calls this tool with title/body/format/paths. 详见 references/api/extended_api.md

ParameterTypeDescription
body *stringDocument body, cleaned by Agent (required)
format *stringContent format: markdown / lake / html (required)
target_book_id *stringTarget repository ID or namespace (required)
title *stringDocument title (required)
pathsarrayDirectory paths, e.g. ["Java/Spring","Database/MySQL"]. 0-5 paths: 传空数组表示复制到知识库根目录(不建目录、不挂 TOC)
source_titlestringSource document title for the footer link
source_urlstringSource document URL, appended as footer link

yuque_import_url

Import content from a web URL into Yuque. Fetches page, extracts readable content, creates doc. 详见 references/api/extended_api.md

ParameterTypeDescription
book_id *stringTarget repository ID or namespace (required)
paths *arrayDirectory paths, e.g. ["收集/技术文章"]. 1-5 paths (required)
url *stringWeb page URL to import (required)
formatstringContent format: markdown / html, defaults to markdown
titlestringDocument title, defaults to page title

yuque_import_file

Import a local Markdown/HTML file into Yuque. 3 modes: direct / upload_assets / embed_assets. 详见 references/api/extended_api.md

ParameterTypeDescription
book_id *stringTarget repository ID or namespace (required)
file_path *stringLocal file path (required, .md or .html)
paths *arrayDirectory paths, e.g. ["导入/技术文档"]. 1-5 paths (required)
formatstringContent format: markdown / lake / html, defaults to markdown
modestringImport mode: direct / upload_assets / embed_assets (default: direct)
slugstringDocument slug, auto-generated if omitted
titlestringDocument title, defaults to filename without extension

yuque_diff_doc_versions

Compare two document versions and show line-level diff (added/removed/unchanged). Computes diff locally. 详见 references/api/doc_api.md

ParameterTypeDescription
version_id_1 *numberFirst version ID (required, older version)
version_id_2 *numberSecond version ID (required, newer version)
context_linesnumberUnchanged context lines around changes (default 3, 0 = no context)
max_linesnumberMax diff lines to show in preview (default 200, 0 = all)

yuque_get_toc

Get repo TOC tree (flat array, navigable via uuid/parent_uuid/child_uuid). GET /repos/:id/toc. 详见 references/api/toc_api.md

ParameterTypeDescription
book_id *stringRepository ID (numeric) or namespace like group/book_slug (required)
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_update_toc

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

ParameterTypeDescription
action *stringAction type (required): appendNode, prependNode, editNode, removeNode
action_mode *stringAction mode (required): sibling | child. For removeNode: sibling = delete this node only, child = delete this node and all its children
book_id *stringRepository ID or namespace (required)
confirmstringConfirmation token. Must be set to the exact string 'DELETE' to proceed. This is a safety guard against accidental deletion.
doc_idsarrayDocument ID array, e.g. [123,456] (required for creating doc nodes)
node_uuidstringTarget node UUID (required for move/edit/delete)
open_windownumberOpen in new window: 0=same page, 1=new window (optional for links, default 0)
target_uuidstringTarget node UUID, defaults to root if omitted
titlestringNode title (required for creating group/link, optional for edit)
typestringNode type: DOC, LINK, TITLE (required for create, optional for edit)
urlstringNode URL (required for creating link, optional for edit)
visiblenumberVisible: 0=hidden, 1=visible (default 1)

yuque_batch_update_toc

Batch update repo TOC. Agent provides ops plan, tool executes only. Supported actions: createTitle, appendNode, removeNode, moveNode, prependDoc. createTitle auto-reuses existing dirs. appendNode/moveNode support target_title. ⚠️ Remove/move ops require confirm='RESTRUCTURE'. For cross-book copy, use yuque_copy_doc instead.

ParameterTypeDescription
book_id *stringRepository ID or namespace (required)
confirm *stringMust be 'RESTRUCTURE' to proceed with any operation that modifies TOC.
ops *JSON array of operations (or JSON-encoded string). Supported: createTitle, appendNode, removeNode, moveNode, prependDoc. createTitle auto-reuses existing dirs. appendNode/moveNode/prependDoc support t…

yuque_list_repos

List repos for a user or group. GET /users|groups/:login/repos. 详见 references/api/repo_api.md

ParameterTypeDescription
login *stringUser or group login / ID (required)
filterByAbilitystringAbility filter: create_doc (only repos with doc creation permission)
limitnumberPage size, max 100, default 100
offsetnumberPagination offset, default 0
rawbooleanReturn raw full JSON (default false, returns trimmed fields)
typestringType filter: Book (docs) / Design (boards)

yuque_create_repo

Create a repo, auto-detects user vs group endpoint. POST /users|groups/:login/repos. 详见 references/api/repo_api.md

ParameterTypeDescription
login *stringUser or group login / ID (required)
name *stringRepository name (required)
descriptionstringDescription
enhancedPrivacybooleanEnhanced privacy: non-admin members get no access by default
publicnumberVisibility: 0=private, 1=public, 2=team-public (default 0)
rawbooleanReturn raw full JSON (default false, returns trimmed fields)
slugstringRepository slug. Rule: English translation of name, kebab-case, append timestamp. Auto-generated if omitted.

yuque_get_repo

Get repo detail including toc_yml (TOC tree in YAML), namespace, items_count, full metadata. GET /repos/:id. 详见 references/api/repo_api.md

ParameterTypeDescription
book_id *stringRepository ID (numeric) or namespace like group/book_slug (required)
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_update_repo

Update repo name/description/slug/public. PUT /repos/:id. 详见 references/api/repo_api.md

ParameterTypeDescription
book_id *stringRepository ID (numeric) or namespace like group/book_slug (required)
descriptionstringDescription
namestringName
publicnumberVisibility: 0=private, 1=public, 2=team-public
rawbooleanReturn raw full JSON (default false, returns trimmed fields)
slugstringSlug
tocstringTOC in Markdown format: [Title](doc-slug), supports batch TOC update

yuque_delete_repo

Delete a repo (⚠️ irreversible). Requires confirm='DELETE'. DELETE /repos/:id. 详见 references/api/repo_api.md

ParameterTypeDescription
book_id *stringRepository ID (numeric) or namespace like group/book_slug (required)
confirm *stringConfirmation token. Must be set to the exact string 'DELETE' to proceed. This is a safety guard against accidental deletion.
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_batch_get_repos

Batch get repo details (concurrent GET, read-only, max 20). 详见 references/api/repo_api.md

ParameterTypeDescription
ids *arrayRepository IDs as array, e.g. [123,456] or ["group/repo-a","group/repo-b"] (required, max 20)

yuque_export_repo

Export all docs in a repo as Markdown files organized by TOC dir structure, with images downloaded and INDEX.md+GRAPH.md generated. 详见 references/api/extended_api.md

ParameterTypeDescription
book_id *string | numberRepository ID (numeric) or namespace like group/book_slug (required). number 或字符串都接受
download_imagesbooleanDownload images to local (default true). Set false to skip download.
output_dirstringOutput directory path (absolute or relative). Defaults to ./yuque-export/<book_slug>/
raw_bodybooleanUse raw body field instead of converting body_html to markdown (default false)

yuque_copy_repo

Batch copy documents to another repo. Agent provides cleaned documents array (title/body/format/paths). Tool creates TOC dirs and copies. 详见 references/api/extended_api.md

ParameterTypeDescription
documents *stringJSON array of {title, body, format, paths, source_url?, source_title?}. paths is array of 1-5 directory paths. (required)
target_book_id *stringTarget repository ID or namespace (required)
rawbooleanReturn raw full JSON

yuque_get_group_statistics

Get group summary statistics. GET /groups/:login/statistics. 详见 references/api/statistic_api.md

ParameterTypeDescription
login *stringGroup login or ID (required)

yuque_get_member_statistics

Get group member statistics. GET /groups/:login/statistics/members. 详见 references/api/statistic_api.md

ParameterTypeDescription
login *stringGroup login or ID (required)
limitnumberPage size, max 20, default 10
namestringFilter by member name
pagenumberPage number, default 1
rangenumberDate range: 0=all, 30=last 30 days, 365=last year (default 0)
sortFieldstringSort field: write_doc_count, write_count, read_count, like_count
sortOrderstringSort order: desc (default) / asc

yuque_get_book_statistics

Get group repo statistics. GET /groups/:login/statistics/books. 详见 references/api/statistic_api.md

ParameterTypeDescription
login *stringGroup login or ID (required)
limitnumberPage size, max 20, default 10
namestringFilter by repository name
pagenumberPage number, default 1
rangenumberDate range: 0=all, 30=last 30 days, 365=last year (default 0)
sortFieldstringSort field: content_updated_at_ms, word_count, post_count, read_count, like_count, watch_count, comment_count
sortOrderstringSort order: desc (default) / asc

yuque_get_doc_statistics

Get group document statistics. GET /groups/:login/statistics/docs. 详见 references/api/statistic_api.md

ParameterTypeDescription
login *stringGroup login or ID (required)
bookIdstring | numberFilter by repository ID. number 或数字字符串都接受
limitnumberPage size, max 20, default 10
namestringFilter by document name
pagenumberPage number, default 1
rangenumberDate range: 0=all, 30=last 30 days, 365=last year (default 0)
sortFieldstringSort field: content_updated_at, word_count, read_count, like_count, comment_count, created_at
sortOrderstringSort order: desc (default) / asc

yuque_list_notes

List current user's notes. GET /notes. 详见 references/api/note_api.md

ParameterTypeDescription
limitnumberPage size, default 20
pagenumberPage number, default 1
statusnumberStatus filter: 0=active, 9=deleted

yuque_get_note

Get note detail. GET /notes/:id. 详见 references/api/note_api.md

ParameterTypeDescription
note_id *string | numberNote ID (required). number 或数字字符串都接受
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_create_note

Create a note (short memo). Returns note_url, plus id/slug when resolvable (upstream POST /notes only returns note_url, so id is looked up in the note list right after create). POST /notes. 详见 references/api/note_api.md

ParameterTypeDescription
body *stringNote body content (required, plain text or Markdown)
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_update_note

Update or delete a note. ⚠️ Deleting (status=9) requires confirm='DELETE'. PUT /notes/:id. 详见 references/api/note_api.md

ParameterTypeDescription
note_id *string | numberNote ID (required). number 或数字字符串都接受
bodystringNew content (plain text or Markdown, unchanged if omitted)
confirmstringConfirmation token. Must be set to the exact string 'DELETE' to proceed. This is a safety guard against accidental deletion.
rawbooleanReturn raw full JSON (default false, returns trimmed fields)
statusnumberStatus: 0=active, 9=deleted (unchanged if omitted)

yuque_list_recycles

List recycle bin items (requires cookie+ctoken). GET /mine/recycles. 详见 references/api/recycle_api.md

ParameterTypeDescription
limitnumberPage size, max 100, default 50
offsetnumberPagination offset, default 0
target_typestringTarget type filter: Doc, Note, Repo

yuque_restore_recycle

Restore an item from recycle bin (requires cookie+ctoken). PUT /mine/recycles/:id/restore. 详见 references/api/recycle_api.md

ParameterTypeDescription
recycle_id *string | numberRecycle bin item ID (required). number 或数字字符串都接受

yuque_destroy_recycle

Permanently delete a recycle bin item (⚠️ irreversible, requires cookie+ctoken). Requires confirm='DELETE'. DELETE /mine/recycles/:id. 详见 references/api/recycle_api.md

ParameterTypeDescription
confirm *stringConfirmation token. Must be set to the exact string 'DELETE' to proceed. This is a safety guard against accidental deletion.
recycle_id *string | numberRecycle bin item ID (required). number 或数字字符串都接受

yuque_upload_attachment

Upload a file to Yuque CDN (image≤50MB, attachment/video≤2GB, requires cookie+ctoken). Extension pre-check: only Yuque-supported formats allowed (official list: https://www.yuque.com/yuque/gpvawt/ca13hg), unsupported extensions rejected with a friendly error (pack into zip first). POST /upload/attach. 详见 references/api/upload_api.md

ParameterTypeDescription
file_path *stringLocal file path (required)
typestringFile type: image, attachment, video, default attachment
user_idstringUser ID, auto-detected from token if omitted

yuque_get_board

Get board resource JSON DSL and summary stats from a document. GET /yfm/boards. 详见 references/api/board_api.md

ParameterTypeDescription
resource_id *stringBoard resource ID (required, extract the ID part from board://<resource_id>)
doc_idstring | numberDocument ID (mutually exclusive with url). number 或数字字符串都接受
urlstringDocument URL (mutually exclusive with doc_id)

yuque_create_board

Create a board resource (mindmap/flowchart/architecture diagram) in a document. POST /yfm/boards. 详见 references/api/board_api.md

ParameterTypeDescription
dsl *stringBoard DSL text content (required), format depends on type
type *stringBoard type (required): mindmap, flowchart, architecturediagram
doc_idstring | numberDocument ID (mutually exclusive with url). number 或数字字符串都接受
insert_after_lake_idstringInsert after specified Lake node, appends to document end if omitted
urlstringDocument URL (mutually exclusive with doc_id)

yuque_update_board

Update a board resource (text or dsl, choose one). PUT /yfm/boards. 详见 references/api/board_api.md

ParameterTypeDescription
resource_id *stringBoard resource ID (required, extract from board://<resource_id>)
doc_idstring | numberDocument ID (mutually exclusive with url). number 或数字字符串都接受
dslstringNew JSON DSL object (mutually exclusive with text), sent as JSON
textstringNew textual DSL content (mutually exclusive with dsl)
urlstringDocument URL (mutually exclusive with doc_id)

yuque_get_book_stacks

获取当前用户的知识库分组(书架)列表,含每个分组下的知识库。需要 cookie+ctoken 认证。GET /api/mine/book_stacks

yuque_get_editor_center

获取个人编辑中心全景数据:知识库数、文档数、总字数、编辑次数、活跃天数、互动用户排行、最多字的知识库等。需要 cookie+ctoken 认证。GET /api/mine/editor_center

yuque_create_book_stack

创建知识库分组(书架)并设定名称。需要 cookie+ctoken 认证。语雀 create 不能直接指定名字,本工具内部 create 后自动 edit 改名。body {name, target_rank}。

ParameterTypeDescription
name *string分组名称(必填)
target_ranknumber目标排序位(可选,默认 0)

yuque_rename_book_stack

重命名知识库分组(书架)。需要 cookie+ctoken 认证。PUT /api/book_stacks/{stack_id},body {name, type:'user_books'}。

ParameterTypeDescription
name *string新名称(必填)
stack_id *string | number分组 ID(书架 ID,必填)。number 或数字字符串都接受

yuque_update_book_stack

移动知识库到指定分组(书架)。需要 cookie+ctoken 认证。PUT /api/mine/book_stack/move。常用于将知识库从一个分组(如预废弃)移到另一个分组(如废弃)。

ParameterTypeDescription
book_id *number知识库 ID(数字,必填)
stack_id *number目标分组 ID(书架 ID,必填)

yuque_sort_book_stack

排序分组(书架)内知识库顺序。需要 cookie+ctoken 认证。PUT /api/mine/book_stack/move,传有序 targetBookIds(数组顺序即最终排序)。常用于把分组内知识库按期望顺序重排。

ParameterTypeDescription
book_ids *array排序后的知识库 ID 数组(按期望顺序排列,必填)
stack_id *number目标分组 ID(书架 ID,必填)

yuque_delete_book_stack

删除知识库分组(书架)。⚠️ 不可恢复!需传 confirm='DELETE' 二次确认。DELETE /api/book_stacks/{stack_id}。分组内须先清空知识库。

ParameterTypeDescription
confirm *string危险操作二次确认,必须传 'DELETE'
stack_id *string | number要删除的分组 ID(书架 ID,必填)。number 或数字字符串都接受

yuque_web_get_doc

Cookie-based: Get full document detail with body/content. Supports markdown/lake/lakesheet formats. Returns richer fields than v2 get_doc (54 fields including abilities, joinToken, etc.). No membership required, no Token rate limiting. GET /api/docs/{id}?book_id={book_id}. id supports doc slug; book_id supports namespace/slug (e.g. group/book_slug) or numeric. 详见 references/api/web_doc_api.md

ParameterTypeDescription
book_id *stringRepository ID, namespace or slug (e.g. group/book_slug), or numeric (required)
id *stringDocument ID or slug (required)
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_web_list_docs

Cookie-based: List documents in a repo. Returns richer fields than v2 list_docs (draft_version, editor_meta, read_status, etc.). No membership required. GET /api/docs?book_id={book_id}. 详见 references/api/web_doc_api.md

ParameterTypeDescription
book_id *stringRepository ID (numeric, required)
limitnumberPage size, max 100, default 100
offsetnumberPagination offset, default 0
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_web_list_repos

Cookie-based: List repos for current user. Returns richer fields than v2 list_repos (abilities, cover_color, scene, etc.). Includes permission info (abilities.create_doc, modify_setting, destroy). No membership required. GET /api/books. 详见 references/api/web_doc_api.md

ParameterTypeDescription
limitnumberPage size, max 100, default 100
offsetnumberPagination offset, default 0
rawbooleanReturn raw full JSON (default false, returns trimmed fields)
user_idstringUser ID (numeric, optional, defaults to current user)

yuque_web_get_toc

Cookie-based: Get repo TOC tree (flat array, navigable via uuid/parent_uuid/child_uuid). Same structure as v2 get_toc, but no membership required. GET /api/catalog_nodes?book_id={book_id}. 详见 references/api/web_doc_api.md

ParameterTypeDescription
book_id *stringRepository ID (numeric, required)
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_web_delete_doc

Cookie-based: Delete a document (moves to recycle bin). DELETE /api/docs/{id}?book_id={book_id}. No membership required, alternative to v2 delete_doc when Token is rate-limited/expired. ⚠️ Requires confirm='DELETE'. 详见 references/api/web_doc_api.md

ParameterTypeDescription
book_id *stringRepository ID (numeric, required)
confirm *stringConfirmation token. Must be set to the exact string 'DELETE' to proceed. This is a safety guard against accidental deletion.
id *stringDocument ID (numeric, required)
rawbooleanReturn raw full JSON (default false, returns trimmed fields)

yuque_web_batch_move_catalog_nodes

Cookie-based: Batch move document nodes to a target catalog node. PUT /api/catalog_nodes/batch. Supports cross-repo move (target_book_id may differ from book_id). No membership required. Moves the specified node_uuids under the target_uuid directory as children. 详见 references/api/web_doc_api.md

ParameterTypeDescription
book_id *string源知识库 ID(数字,必填)。节点当前所在的知识库。 / Source repository ID (numeric, required). The repo the nodes currently live in.
node_uuids *Node UUIDs to move, as a string array or JSON-encoded string (required)
target_uuid *stringTarget catalog node UUID to move into (required)
target_book_idstring目标知识库 ID(数字,可选)。跨库移动时填目标知识库 ID。缺省为 book_id(同库移动)。 / Target repository ID (numeric, optional). For cross-repo move set this to the…

yuque_web_move_catalog_node

Cookie-based: Move a single catalog node to a target catalog node / target repo. PUT /api/catalog_nodes/move. Supports cross-repo move (target_book_id may differ from book_id) and moving the whole subtree (with_children). No membership required. 详见 references/api/web_doc_api.md

ParameterTypeDescription
book_id *stringSource repository ID (numeric, required). The repo the node currently lives in.
node_uuid *stringCatalog node UUID to move (required).
actionstringMove action. Default 'prependChild'. Common values: prependChild (as first child), appendChild (as last child).
insert_to_catalogbooleanWhether to insert into the catalog/TOC. Default true.
target_book_idstringTarget repository ID (numeric). For cross-repo move set this to the destination repo. Defaults to book_id (same-repo move).
target_uuidstringTarget catalog node UUID to move into. Leave empty / null to move to the root of the target repo.
with_childrenbooleanMove the whole subtree (all descendant nodes) together. Default true.

yuque_web_copy_catalog_node

Cookie-based: Copy a catalog node (doc or dir) to a target catalog node / target repo, server-side with attachment re-upload. PUT /api/catalog_nodes/copy. The source node is kept; a copy is created in the target repo and attachments re-uploaded there (preserves file cards). node_uuid must be from the web catalog (/api/catalog_nodes), not the v2 TOC. 详见 references/api/web_doc_api.md

ParameterTypeDescription
book_id *stringSource repository ID (numeric, required). The repo the node currently lives in.
node_uuid *stringSource catalog node UUID to copy (required). Must exist in the web catalog (/api/catalog_nodes).
target_book_id *stringTarget repository ID (numeric, required). The repo to copy into.
actionstringCopy action. Default 'prependChild'. Common values: prependChild (as first child), appendChild (as last child).
insert_to_catalogbooleanWhether to insert into the catalog/TOC. Default true.
target_uuidstringTarget catalog node UUID to copy into. Leave empty / null to copy to the root of the target repo.
with_childrenbooleanCopy the whole subtree (all descendant nodes) together. Default false.