yuque-ai-mcp
v4.0.1Yuque 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
| Parameter | Type | Description |
|---|---|---|
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
id * | string | User login or ID (required) |
offset | number | Pagination offset, default 0 |
raw | boolean | Return raw full JSON (default false, returns trimmed fields) |
role | number | Role filter: 0=admin, 1=member |
yuque_search
General search across Yuque docs and repos. GET /search?q=:q&type=:type. 详见 references/api/search_api.md
| Parameter | Type | Description |
|---|---|---|
q * | string | Search keyword (required, max 200 chars) |
type * | string | Search type: doc (document) / repo (repository) |
creator | string | Filter by author login |
page | number | Page number (1-100) |
scope | string | Search scope (max 400 chars), e.g. group or group/book_slug |
yuque_rag_search
RAG-enhanced search: accepts LLM-generated keywords, runs concurrent multi-path searches, deduplicates by doc_id, fetches top-N full doc content. 详见 references/api/search_api.md
| Parameter | Type | Description |
|---|---|---|
keywords * | string | Search keywords, comma-separated. Generated by the calling LLM, 5-10 recommended |
creator | string | Filter by author login |
fetch_docs | number | Fetch full content of top N documents (default 3, max 10) |
max_results | number | Max search results (default 10, max 50) |
scope | string | Search scope, e.g. scope=group for team-only, or scope=group/book_slug for a repo. Leave empty for global |
yuque_web_search
Cookie-based web search across Yuque docs/books/users. Returns full document objects (_record) without needing a second get_doc call. Supports scope filtering (repo/group), type filtering (content/book/user), pagination, AND advanced search syntax: "phrase", in:title, NOT/AND/OR, updated:>YYYY-MM-DD, url:scope, is:related/public. Requires cookie+ctoken in config. GET /api/zsearch?q=:q&type=:type&scope=:scope&p=:p. ⚠️ Cookie-based API — QPS unknown, avoid concurrent calls. 详见 references/api/search_api.md
| Parameter | Type | Description |
|---|---|---|
q * | string | Search keyword (required). Supports advanced syntax: "phrase", in:title, NOT/AND/OR, updated:>YYYY-MM-DD, url:scope, is:related/public. 详见 references/api/search_api.md |
p | number | Page number (1-based, default 1, max 100) |
scope | string | Search scope. Root '/' for global, '/group_slug' for team, '/group_slug/book_slug' for a repo. Default: / |
type | string | Search type: content (docs) / book (repos) / user (users). Default: content |
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
| Parameter | Type | Description |
|---|---|---|
login * | string | Group login or ID (required) |
offset | number | Pagination offset, default 0 |
raw | boolean | Return raw full JSON (default false, returns trimmed fields) |
role | number | Role 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
| Parameter | Type | Description |
|---|---|---|
id * | string | User login or ID (required) |
login * | string | Group login or ID (required) |
raw | boolean | Return raw full JSON (default false, returns trimmed fields) |
role | number | Role: 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
| Parameter | Type | Description |
|---|---|---|
confirm * | string | Confirmation token. Must be set to the exact string 'DELETE' to proceed. This is a safety guard against accidental deletion. |
id * | string | User login or ID (required) |
login * | string | Group login or ID (required) |
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Repository ID (numeric) or namespace like group/book_slug (required) |
changed_at_gte | string | Only return docs changed at/after this ISO 8601 time (incremental sync), e.g. 2026-10-16T00:00:00Z |
deleted | boolean | Return 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 |
limit | number | Page size, max 100, default 100 |
offset | number | Pagination offset, default 0 |
optional_properties | string | Extra fields, comma-separated. Supports: hits, tags, latest_version_id |
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
body * | string | Document body content (required) |
book_id * | string | Repository ID (numeric) or namespace like group/book_slug (required) |
format | string | Content format: markdown / html / lake, defaults to markdown |
parent_uuid | string | TOC parent node UUID. 指定后新文档挂到该节点下。不传默认挂根目录。 |
public | number | Visibility: 0=private, 1=public, 2=team-public, defaults to repo setting |
raw | boolean | Return raw full JSON (default false, returns trimmed fields) |
slug | string | Document slug. Rule: kebab-case, lowercase, no special chars. Auto-generated if omitted. |
title | string | Title, 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
| Parameter | Type | Description |
|---|---|---|
id * | string | Document ID (numeric) or slug (required) |
book_id | string | Repository ID or namespace (optional; required when id is a slug) |
page | number | Table page number, ≥1, default 1 |
page_size | number | Table page size, 1-200, default 100 |
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Repository ID (numeric) or namespace like group/book_slug (required) |
id * | string | Document ID or slug (required) |
body | string | Document body content |
format | string | Content format: markdown / html / lake |
public | number | Visibility: 0=private, 1=public, 2=team-public |
raw | boolean | Return raw full JSON (default false, returns trimmed fields) |
slug | string | Document slug |
title | string | Title |
yuque_delete_doc
Delete a document (moves to recycle bin). ⚠️ Requires confirm='DELETE'. DELETE /repos/:id/docs/:id. 详见 references/api/doc_api.md
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Repository ID (numeric) or namespace like group/book_slug (required) |
confirm * | string | Confirmation token. Must be set to the exact string 'DELETE' to proceed. This is a safety guard against accidental deletion. |
id * | string | Document ID or slug (required) |
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
doc_id * | string | number | Document ID (required). number 或数字字符串都接受 |
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
id * | string | number | Version ID (required). number 或数字字符串都接受 |
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
from * | string | Caller app name (required). Use your team/app English name |
book_id | string | Repository ID or namespace (e.g. yuque/developer), used with doc_id |
doc_id | string | Document ID (mutually exclusive with url, requires book_id or namespace) |
outline | number | Show outline sidebar: 1=show, 0=hide |
title | number | Show title: 1=show, 0=hide |
translate | string | 翻译语种,支持:en/zh/ru/pt/es/fr/ja/ar/de/it/ko/tr/vi/pl/he/id/hi/nl/th |
url | string | Full 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
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Repository ID (numeric) or namespace like group/book_slug (required, shared for all docs) |
ids * | array | Document IDs as array, e.g. [123,456] or ["slug-a","slug-b"] (required, max 20) |
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
id * | string | number | Document ID or slug (required). number 或字符串都接受 |
output_dir * | string | Output directory path (required). The file will be saved as <output_dir>/<title>.md |
book_id | string | Repository ID or namespace (recommended when using slug) |
raw_body | boolean | Use 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
| Parameter | Type | Description |
|---|---|---|
id * | string | number | Document ID or slug (required). number 或字符串都接受 |
output_dir * | string | Output directory path (required). Resources saved to <output_dir>/images/ and <output_dir>/attachments/ |
book_id | string | Repository 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
| Parameter | Type | Description |
|---|---|---|
body * | string | Document body, cleaned by Agent (required) |
format * | string | Content format: markdown / lake / html (required) |
target_book_id * | string | Target repository ID or namespace (required) |
title * | string | Document title (required) |
paths | array | Directory paths, e.g. ["Java/Spring","Database/MySQL"]. 0-5 paths: 传空数组表示复制到知识库根目录(不建目录、不挂 TOC) |
source_title | string | Source document title for the footer link |
source_url | string | Source 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
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Target repository ID or namespace (required) |
paths * | array | Directory paths, e.g. ["收集/技术文章"]. 1-5 paths (required) |
url * | string | Web page URL to import (required) |
format | string | Content format: markdown / html, defaults to markdown |
title | string | Document 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
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Target repository ID or namespace (required) |
file_path * | string | Local file path (required, .md or .html) |
paths * | array | Directory paths, e.g. ["导入/技术文档"]. 1-5 paths (required) |
format | string | Content format: markdown / lake / html, defaults to markdown |
mode | string | Import mode: direct / upload_assets / embed_assets (default: direct) |
slug | string | Document slug, auto-generated if omitted |
title | string | Document 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
| Parameter | Type | Description |
|---|---|---|
version_id_1 * | number | First version ID (required, older version) |
version_id_2 * | number | Second version ID (required, newer version) |
context_lines | number | Unchanged context lines around changes (default 3, 0 = no context) |
max_lines | number | Max 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
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Repository ID (numeric) or namespace like group/book_slug (required) |
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
action * | string | Action type (required): appendNode, prependNode, editNode, removeNode |
action_mode * | string | Action mode (required): sibling | child. For removeNode: sibling = delete this node only, child = delete this node and all its children |
book_id * | string | Repository ID or namespace (required) |
confirm | string | Confirmation token. Must be set to the exact string 'DELETE' to proceed. This is a safety guard against accidental deletion. |
doc_ids | array | Document ID array, e.g. [123,456] (required for creating doc nodes) |
node_uuid | string | Target node UUID (required for move/edit/delete) |
open_window | number | Open in new window: 0=same page, 1=new window (optional for links, default 0) |
target_uuid | string | Target node UUID, defaults to root if omitted |
title | string | Node title (required for creating group/link, optional for edit) |
type | string | Node type: DOC, LINK, TITLE (required for create, optional for edit) |
url | string | Node URL (required for creating link, optional for edit) |
visible | number | Visible: 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.
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Repository ID or namespace (required) |
confirm * | string | Must 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
| Parameter | Type | Description |
|---|---|---|
login * | string | User or group login / ID (required) |
filterByAbility | string | Ability filter: create_doc (only repos with doc creation permission) |
limit | number | Page size, max 100, default 100 |
offset | number | Pagination offset, default 0 |
raw | boolean | Return raw full JSON (default false, returns trimmed fields) |
type | string | Type 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
| Parameter | Type | Description |
|---|---|---|
login * | string | User or group login / ID (required) |
name * | string | Repository name (required) |
description | string | Description |
enhancedPrivacy | boolean | Enhanced privacy: non-admin members get no access by default |
public | number | Visibility: 0=private, 1=public, 2=team-public (default 0) |
raw | boolean | Return raw full JSON (default false, returns trimmed fields) |
slug | string | Repository 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
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Repository ID (numeric) or namespace like group/book_slug (required) |
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Repository ID (numeric) or namespace like group/book_slug (required) |
description | string | Description |
name | string | Name |
public | number | Visibility: 0=private, 1=public, 2=team-public |
raw | boolean | Return raw full JSON (default false, returns trimmed fields) |
slug | string | Slug |
toc | string | TOC 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
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Repository ID (numeric) or namespace like group/book_slug (required) |
confirm * | string | Confirmation token. Must be set to the exact string 'DELETE' to proceed. This is a safety guard against accidental deletion. |
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
ids * | array | Repository 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
| Parameter | Type | Description |
|---|---|---|
book_id * | string | number | Repository ID (numeric) or namespace like group/book_slug (required). number 或字符串都接受 |
download_images | boolean | Download images to local (default true). Set false to skip download. |
output_dir | string | Output directory path (absolute or relative). Defaults to ./yuque-export/<book_slug>/ |
raw_body | boolean | Use 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
| Parameter | Type | Description |
|---|---|---|
documents * | string | JSON array of {title, body, format, paths, source_url?, source_title?}. paths is array of 1-5 directory paths. (required) |
target_book_id * | string | Target repository ID or namespace (required) |
raw | boolean | Return raw full JSON |
yuque_get_group_statistics
Get group summary statistics. GET /groups/:login/statistics. 详见 references/api/statistic_api.md
| Parameter | Type | Description |
|---|---|---|
login * | string | Group login or ID (required) |
yuque_get_member_statistics
Get group member statistics. GET /groups/:login/statistics/members. 详见 references/api/statistic_api.md
| Parameter | Type | Description |
|---|---|---|
login * | string | Group login or ID (required) |
limit | number | Page size, max 20, default 10 |
name | string | Filter by member name |
page | number | Page number, default 1 |
range | number | Date range: 0=all, 30=last 30 days, 365=last year (default 0) |
sortField | string | Sort field: write_doc_count, write_count, read_count, like_count |
sortOrder | string | Sort order: desc (default) / asc |
yuque_get_book_statistics
Get group repo statistics. GET /groups/:login/statistics/books. 详见 references/api/statistic_api.md
| Parameter | Type | Description |
|---|---|---|
login * | string | Group login or ID (required) |
limit | number | Page size, max 20, default 10 |
name | string | Filter by repository name |
page | number | Page number, default 1 |
range | number | Date range: 0=all, 30=last 30 days, 365=last year (default 0) |
sortField | string | Sort field: content_updated_at_ms, word_count, post_count, read_count, like_count, watch_count, comment_count |
sortOrder | string | Sort order: desc (default) / asc |
yuque_get_doc_statistics
Get group document statistics. GET /groups/:login/statistics/docs. 详见 references/api/statistic_api.md
| Parameter | Type | Description |
|---|---|---|
login * | string | Group login or ID (required) |
bookId | string | number | Filter by repository ID. number 或数字字符串都接受 |
limit | number | Page size, max 20, default 10 |
name | string | Filter by document name |
page | number | Page number, default 1 |
range | number | Date range: 0=all, 30=last 30 days, 365=last year (default 0) |
sortField | string | Sort field: content_updated_at, word_count, read_count, like_count, comment_count, created_at |
sortOrder | string | Sort order: desc (default) / asc |
yuque_list_notes
List current user's notes. GET /notes. 详见 references/api/note_api.md
| Parameter | Type | Description |
|---|---|---|
limit | number | Page size, default 20 |
page | number | Page number, default 1 |
status | number | Status filter: 0=active, 9=deleted |
yuque_get_note
Get note detail. GET /notes/:id. 详见 references/api/note_api.md
| Parameter | Type | Description |
|---|---|---|
note_id * | string | number | Note ID (required). number 或数字字符串都接受 |
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
body * | string | Note body content (required, plain text or Markdown) |
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
note_id * | string | number | Note ID (required). number 或数字字符串都接受 |
body | string | New content (plain text or Markdown, unchanged if omitted) |
confirm | string | Confirmation token. Must be set to the exact string 'DELETE' to proceed. This is a safety guard against accidental deletion. |
raw | boolean | Return raw full JSON (default false, returns trimmed fields) |
status | number | Status: 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
| Parameter | Type | Description |
|---|---|---|
limit | number | Page size, max 100, default 50 |
offset | number | Pagination offset, default 0 |
target_type | string | Target 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
| Parameter | Type | Description |
|---|---|---|
recycle_id * | string | number | Recycle 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
| Parameter | Type | Description |
|---|---|---|
confirm * | string | Confirmation token. Must be set to the exact string 'DELETE' to proceed. This is a safety guard against accidental deletion. |
recycle_id * | string | number | Recycle 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
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Local file path (required) |
type | string | File type: image, attachment, video, default attachment |
user_id | string | User 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
| Parameter | Type | Description |
|---|---|---|
resource_id * | string | Board resource ID (required, extract the ID part from board://<resource_id>) |
doc_id | string | number | Document ID (mutually exclusive with url). number 或数字字符串都接受 |
url | string | Document 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
| Parameter | Type | Description |
|---|---|---|
dsl * | string | Board DSL text content (required), format depends on type |
type * | string | Board type (required): mindmap, flowchart, architecturediagram |
doc_id | string | number | Document ID (mutually exclusive with url). number 或数字字符串都接受 |
insert_after_lake_id | string | Insert after specified Lake node, appends to document end if omitted |
url | string | Document 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
| Parameter | Type | Description |
|---|---|---|
resource_id * | string | Board resource ID (required, extract from board://<resource_id>) |
doc_id | string | number | Document ID (mutually exclusive with url). number 或数字字符串都接受 |
dsl | string | New JSON DSL object (mutually exclusive with text), sent as JSON |
text | string | New textual DSL content (mutually exclusive with dsl) |
url | string | Document 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}。
| Parameter | Type | Description |
|---|---|---|
name * | string | 分组名称(必填) |
target_rank | number | 目标排序位(可选,默认 0) |
yuque_rename_book_stack
重命名知识库分组(书架)。需要 cookie+ctoken 认证。PUT /api/book_stacks/{stack_id},body {name, type:'user_books'}。
| Parameter | Type | Description |
|---|---|---|
name * | string | 新名称(必填) |
stack_id * | string | number | 分组 ID(书架 ID,必填)。number 或数字字符串都接受 |
yuque_update_book_stack
移动知识库到指定分组(书架)。需要 cookie+ctoken 认证。PUT /api/mine/book_stack/move。常用于将知识库从一个分组(如预废弃)移到另一个分组(如废弃)。
| Parameter | Type | Description |
|---|---|---|
book_id * | number | 知识库 ID(数字,必填) |
stack_id * | number | 目标分组 ID(书架 ID,必填) |
yuque_sort_book_stack
排序分组(书架)内知识库顺序。需要 cookie+ctoken 认证。PUT /api/mine/book_stack/move,传有序 targetBookIds(数组顺序即最终排序)。常用于把分组内知识库按期望顺序重排。
| Parameter | Type | Description |
|---|---|---|
book_ids * | array | 排序后的知识库 ID 数组(按期望顺序排列,必填) |
stack_id * | number | 目标分组 ID(书架 ID,必填) |
yuque_delete_book_stack
删除知识库分组(书架)。⚠️ 不可恢复!需传 confirm='DELETE' 二次确认。DELETE /api/book_stacks/{stack_id}。分组内须先清空知识库。
| Parameter | Type | Description |
|---|---|---|
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
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Repository ID, namespace or slug (e.g. group/book_slug), or numeric (required) |
id * | string | Document ID or slug (required) |
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Repository ID (numeric, required) |
limit | number | Page size, max 100, default 100 |
offset | number | Pagination offset, default 0 |
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
limit | number | Page size, max 100, default 100 |
offset | number | Pagination offset, default 0 |
raw | boolean | Return raw full JSON (default false, returns trimmed fields) |
user_id | string | User 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
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Repository ID (numeric, required) |
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Repository ID (numeric, required) |
confirm * | string | Confirmation token. Must be set to the exact string 'DELETE' to proceed. This is a safety guard against accidental deletion. |
id * | string | Document ID (numeric, required) |
raw | boolean | Return 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
| Parameter | Type | Description |
|---|---|---|
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 * | string | Target catalog node UUID to move into (required) |
target_book_id | string | 目标知识库 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
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Source repository ID (numeric, required). The repo the node currently lives in. |
node_uuid * | string | Catalog node UUID to move (required). |
action | string | Move action. Default 'prependChild'. Common values: prependChild (as first child), appendChild (as last child). |
insert_to_catalog | boolean | Whether to insert into the catalog/TOC. Default true. |
target_book_id | string | Target repository ID (numeric). For cross-repo move set this to the destination repo. Defaults to book_id (same-repo move). |
target_uuid | string | Target catalog node UUID to move into. Leave empty / null to move to the root of the target repo. |
with_children | boolean | Move 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
| Parameter | Type | Description |
|---|---|---|
book_id * | string | Source repository ID (numeric, required). The repo the node currently lives in. |
node_uuid * | string | Source catalog node UUID to copy (required). Must exist in the web catalog (/api/catalog_nodes). |
target_book_id * | string | Target repository ID (numeric, required). The repo to copy into. |
action | string | Copy action. Default 'prependChild'. Common values: prependChild (as first child), appendChild (as last child). |
insert_to_catalog | boolean | Whether to insert into the catalog/TOC. Default true. |
target_uuid | string | Target catalog node UUID to copy into. Leave empty / null to copy to the root of the target repo. |
with_children | boolean | Copy the whole subtree (all descendant nodes) together. Default false. |