yuque-ai-mcp 2.12.0 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  <h1 align="center">yuque-ai-mcp</h1>
6
6
  <p align="center">
7
- <b>69 fine-grained MCP tools for the full Yuque OpenAPI</b>
7
+ <b>73 fine-grained MCP tools for the full Yuque OpenAPI</b>
8
8
  </p>
9
9
 
10
10
  <p align="center">
@@ -19,11 +19,11 @@
19
19
 
20
20
  ---
21
21
 
22
- A full-featured Yuque (语雀) MCP Server built on the [Model Context Protocol](https://modelcontextprotocol.io/). Provides 69 fine-grained tools across 16 domains — every Yuque OpenAPI endpoint as a dedicated tool.
22
+ A full-featured Yuque (语雀) MCP Server built on the [Model Context Protocol](https://modelcontextprotocol.io/). Provides 73 fine-grained tools across 16 domains — every Yuque OpenAPI endpoint as a dedicated tool.
23
23
 
24
24
  ## Why
25
25
 
26
- - **19 → 69 tools** — 3x more coverage than the official [yuque-mcp-server](https://github.com/yuque/yuque-mcp-server)
26
+ - **19 → 73 tools** — 3x more coverage than the official [yuque-mcp-server](https://github.com/yuque/yuque-mcp-server)
27
27
  - **Dual transport** — stdio + HTTP SSE, shared registry, zero downtime on reload
28
28
  - **Modular architecture** — 15 domains, barrel exports, single source of truth registry
29
29
  - **Full API coverage** — group, recycle, upload, statistics, versions, boards — all the missing pieces
@@ -76,9 +76,9 @@ npm run dev:http # HTTP SSE mode (http://localhost:3099)
76
76
  | **rss** | 3 | Source list, fetch + dedup + save, schedule analysis |
77
77
  | **crawler** | 4 | Fetch, CSS extract, dedup save, schedule analysis |
78
78
  | **kv** | 4 | Get, set, delete, list — incremental sharding, 250KB/doc limit |
79
- | **Total** | **69** | |
79
+ | **Total** | **73** | |
80
80
 
81
- ### All 69 Tools
81
+ ### All 73 Tools
82
82
 
83
83
  | Tool | Domain | Description |
84
84
  |------|--------|-------------|
@@ -89,6 +89,7 @@ npm run dev:http # HTTP SSE mode (http://localhost:3099)
89
89
  | `yuque_rag_search` | search | RAG 检索增强搜索 + 自动获取文档内容 |
90
90
  | `yuque_web_search` | search | Cookie 态 Web 搜索,返回完整文档对象 + 精确总数 + 高亮摘要 |
91
91
  | `yuque_web_delete_doc` | doc | Cookie 态删除文档(v2 被限流时的备用通道,移入回收站) |
92
+ | `yuque_web_copy_catalog_node` | doc | Cookie 态跨库复制目录节点(服务端重传附件,保留文件卡片) |
92
93
  | `yuque_get_group_users` | group | 获取团队成员列表 |
93
94
  | `yuque_update_group_user` | group | 变更团队成员角色 |
94
95
  | `yuque_delete_group_user` | group | 删除团队成员 |
@@ -10,12 +10,13 @@
10
10
  */
11
11
  import { isErrorResult } from "../common/api-client.js";
12
12
  import { webRequest } from "../common/web-request.js";
13
- import { check, requiredString } from "../common/validate.js";
13
+ import { check, requiredString, optionalString } from "../common/validate.js";
14
14
  const CATALOG_REFERER = "https://www.yuque.com/";
15
15
  export const webBatchMoveCatalogNodes = {
16
16
  name: "yuque_web_batch_move_catalog_nodes",
17
17
  description: "Cookie-based: Batch move document nodes to a target catalog node. " +
18
18
  "PUT /api/catalog_nodes/batch. " +
19
+ "Supports cross-repo move (target_book_id may differ from book_id). " +
19
20
  "No membership required. " +
20
21
  "Moves the specified node_uuids under the target_uuid directory as children. " +
21
22
  "详见 references/api/catalog_api.md",
@@ -32,14 +33,18 @@ export const webBatchMoveCatalogNodes = {
32
33
  },
33
34
  book_id: {
34
35
  type: "string",
35
- description: "Repository ID (numeric, required)",
36
+ description: "源知识库 ID(数字,必填)。节点当前所在的知识库。 / Source repository ID (numeric, required). The repo the nodes currently live in.",
37
+ },
38
+ target_book_id: {
39
+ type: "string",
40
+ description: "目标知识库 ID(数字,可选)。跨库移动时填目标知识库 ID。缺省为 book_id(同库移动)。 / Target repository ID (numeric, optional). For cross-repo move set this to the destination repo. Defaults to book_id (same-repo move).",
36
41
  },
37
42
  },
38
43
  required: ["node_uuids", "target_uuid", "book_id"],
39
44
  },
40
45
  async handler(args) {
41
46
  // @validate
42
- const __v = check(requiredString(args?.node_uuids, "node_uuids"), requiredString(args?.target_uuid, "target_uuid"), requiredString(args?.book_id, "book_id"));
47
+ const __v = check(requiredString(args?.node_uuids, "node_uuids"), requiredString(args?.target_uuid, "target_uuid"), requiredString(args?.book_id, "book_id"), optionalString(args?.target_book_id, "target_book_id"));
43
48
  if (__v)
44
49
  return __v;
45
50
  const bookId = Number(args?.book_id);
@@ -49,6 +54,15 @@ export const webBatchMoveCatalogNodes = {
49
54
  isError: true,
50
55
  };
51
56
  }
57
+ // target_book_id 缺省 = book_id(同库移动);填了则支持跨库
58
+ const targetBookIdRaw = args?.target_book_id?.trim();
59
+ const targetBookId = targetBookIdRaw ? Number(targetBookIdRaw) : bookId;
60
+ if (!targetBookId) {
61
+ return {
62
+ content: [{ type: "text", text: JSON.stringify({ error: "target_book_id 必须为有效数字 / target_book_id must be a valid number" }, null, 2) }],
63
+ isError: true,
64
+ };
65
+ }
52
66
  // Parse node_uuids JSON array
53
67
  let nodeUuids;
54
68
  try {
@@ -76,7 +90,7 @@ export const webBatchMoveCatalogNodes = {
76
90
  node_uuids: nodeUuids,
77
91
  target_uuid: args.target_uuid,
78
92
  book_id: bookId,
79
- target_book_id: bookId,
93
+ target_book_id: targetBookId,
80
94
  transfer_action: "prependChild",
81
95
  insert_to_catalog: true,
82
96
  };
@@ -93,7 +107,10 @@ export const webBatchMoveCatalogNodes = {
93
107
  moved_count: nodeUuids.length,
94
108
  node_uuids: nodeUuids,
95
109
  target_uuid: args.target_uuid,
96
- message: `成功将 ${nodeUuids.length} 个文档节点移动到目标目录下 / Successfully moved ${nodeUuids.length} document nodes to target catalog`,
110
+ book_id: bookId,
111
+ target_book_id: targetBookId,
112
+ cross_repo: targetBookId !== bookId,
113
+ message: `成功将 ${nodeUuids.length} 个文档节点移动到目标目录下(${targetBookId !== bookId ? "跨库" : "同库"}) / Successfully moved ${nodeUuids.length} document nodes to target catalog (${targetBookId !== bookId ? "cross-repo" : "same-repo"})`,
97
114
  }, null, 2) }],
98
115
  };
99
116
  },
@@ -1 +1 @@
1
- {"version":3,"file":"batch-move-catalog-nodes.js","sourceRoot":"","sources":["../../src/web-doc/batch-move-catalog-nodes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,eAAe,GAAG,wBAAwB,CAAC;AAEjD,MAAM,CAAC,MAAM,wBAAwB,GAAY;IAC/C,IAAI,EAAE,oCAAoC;IAC1C,WAAW,EACT,oEAAoE;QACpE,gCAAgC;QAChC,0BAA0B;QAC1B,8EAA8E;QAC9E,kCAAkC;IAEpC,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kFAAkF;aAChG;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kDAAkD;aAChE;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mCAAmC;aACjD;SACF;QACD,QAAQ,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,SAAS,CAAC;KACnD;IAED,KAAK,CAAC,OAAO,CAAC,IAAI;QAChB,YAAY;QACZ,MAAM,GAAG,GAAG,KAAK,CACf,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,YAAY,CAAC,EAC9C,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,aAAa,CAAC,EAChD,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,CAAC,CACzC,CAAC;QACF,IAAI,GAAG;YAAE,OAAO,GAAG,CAAC;QAEpB,MAAM,MAAM,GAAG,M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+ * web-doc/copy-catalog-node — Cookie 态复制目录节点(跨库复制,服务端重传附件)
3
+ *
4
+ * 端点:PUT /api/catalog_nodes/copy(Web API,Cookie 认证)
5
+ * 职责:将目录节点(文档/目录)复制到目标目录/目标知识库下。
6
+ *
7
+ * 相比 move:
8
+ * - 源节点保留,目标库生成副本
9
+ * - 附件(文件/图片卡片)由服务端重新上传到目标库,卡片引用正确
10
+ * - 这是唯一能跨库保留文件卡片 (ne-card-file) 的途径
11
+ *
12
+ * 注意:node_uuid 必须是 web 目录 (/api/catalog_nodes) 里的节点 uuid,
13
+ * v2 TOC (/api/v2/repos/:id/toc) 的 uuid 可能对不上(两份数据不一致时)。
14
+ */
15
+ import type { McpTool } from "../common/types.js";
16
+ export declare const webCopyCatalogNode: McpTool;
@@ -0,0 +1,121 @@
1
+ /**
2
+ * web-doc/copy-catalog-node — Cookie 态复制目录节点(跨库复制,服务端重传附件)
3
+ *
4
+ * 端点:PUT /api/catalog_nodes/copy(Web API,Cookie 认证)
5
+ * 职责:将目录节点(文档/目录)复制到目标目录/目标知识库下。
6
+ *
7
+ * 相比 move:
8
+ * - 源节点保留,目标库生成副本
9
+ * - 附件(文件/图片卡片)由服务端重新上传到目标库,卡片引用正确
10
+ * - 这是唯一能跨库保留文件卡片 (ne-card-file) 的途径
11
+ *
12
+ * 注意:node_uuid 必须是 web 目录 (/api/catalog_nodes) 里的节点 uuid,
13
+ * v2 TOC (/api/v2/repos/:id/toc) 的 uuid 可能对不上(两份数据不一致时)。
14
+ */
15
+ import { isErrorResult } from "../common/api-client.js";
16
+ import { webRequest } from "../common/web-request.js";
17
+ import { check, requiredString, optionalString, optionalBoolean } from "../common/validate.js";
18
+ const COPY_REFERER = "https://www.yuque.com/";
19
+ export const webCopyCatalogNode = {
20
+ name: "yuque_web_copy_catalog_node",
21
+ description: "Cookie-based: Copy a catalog node (doc or dir) to a target catalog node / target repo, server-side with attachment re-upload. " +
22
+ "PUT /api/catalog_nodes/copy. " +
23
+ "The source node is kept; a copy is created in the target repo and attachments re-uploaded there (preserves file cards). " +
24
+ "node_uuid must be from the web catalog (/api/catalog_nodes), not the v2 TOC. " +
25
+ "详见 references/api/catalog_api.md",
26
+ inputSchema: {
27
+ type: "object",
28
+ properties: {
29
+ book_id: {
30
+ type: "string",
31
+ description: "Source repository ID (numeric, required). The repo the node currently lives in.",
32
+ },
33
+ node_uuid: {
34
+ type: "string",
35
+ description: "Source catalog node UUID to copy (required). Must exist in the web catalog (/api/catalog_nodes).",
36
+ },
37
+ target_book_id: {
38
+ type: "string",
39
+ description: "Target repository ID (numeric, required). The repo to copy into.",
40
+ },
41
+ target_uuid: {
42
+ type: "string",
43
+ description: "Target catalog node UUID to copy into. Leave empty / null to copy to the root of the target repo.",
44
+ },
45
+ action: {
46
+ type: "string",
47
+ description: "Copy action. Default 'prependChild'. Common values: prependChild (as first child), appendChild (as last child).",
48
+ },
49
+ with_children: {
50
+ type: "boolean",
51
+ description: "Copy the whole subtree (all descendant nodes) together. Default false.",
52
+ },
53
+ insert_to_catalog: {
54
+ type: "boolean",
55
+ description: "Whether to insert into the catalog/TOC. Default true.",
56
+ },
57
+ },
58
+ required: ["book_id", "node_uuid", "target_book_id"],
59
+ },
60
+ async handler(args) {
61
+ // @validate
62
+ const __v = check(requiredString(args?.book_id, "book_id"), requiredString(args?.node_uuid, "node_uuid"), requiredString(args?.target_book_id, "target_book_id"), optionalString(args?.target_uuid, "target_uuid"), optionalString(args?.action, "action"), optionalBoolean(args?.with_children, "with_children"), optionalBoolean(args?.insert_to_catalog, "insert_to_catalog"));
63
+ if (__v)
64
+ return __v;
65
+ const bookId = Number(args?.book_id);
66
+ const targetBookId = Number(args?.target_book_id);
67
+ if (!bookId || !targetBookId) {
68
+ return {
69
+ content: [{ type: "text", text: JSON.stringify({ error: "book_id 和 target_book_id 必须为有效数字 / book_id and target_book_id must be valid numbers" }, null, 2) }],
70
+ isError: true,
71
+ };
72
+ }
73
+ // target_uuid 留空 → null(复制到目标库根目录)
74
+ const targetUuid = args?.target_uuid?.trim() || null;
75
+ const body = {
76
+ book_id: bookId,
77
+ node_uuid: args.node_uuid,
78
+ target_uuid: targetUuid,
79
+ action: args?.action?.trim() || "prependChild",
80
+ target_book_id: targetBookId,
81
+ with_children: args?.with_children ?? false,
82
+ insert_to_catalog: args?.insert_to_catalog ?? true,
83
+ };
84
+ const url = "https://www.yuque.com/api/catalog_nodes/copy";
85
+ const result = await webRequest(url, {
86
+ method: "PUT",
87
+ body,
88
+ referer: COPY_REFERER,
89
+ });
90
+ if (isErrorResult(result))
91
+ return result;
92
+ // copy 返回 { meta: { docIds: [...] }, data: [...] }
93
+ let newDocIds = [];
94
+ try {
95
+ const r = result;
96
+ if (Array.isArray(r?.meta?.docIds))
97
+ newDocIds = r.meta.docIds.map((x) => Number(x)).filter(Boolean);
98
+ else if (Array.isArray(r?.data)) {
99
+ const ids = r.data.map((n) => n?.doc_id).filter((x) => x !== undefined && x !== null && x !== "");
100
+ newDocIds = ids.map((x) => Number(x)).filter(Boolean);
101
+ }
102
+ }
103
+ catch {
104
+ newDocIds = [];
105
+ }
106
+ return {
107
+ content: [{ type: "text", text: JSON.stringify({
108
+ success: true,
109
+ book_id: bookId,
110
+ target_book_id: targetBookId,
111
+ node_uuid: args.node_uuid,
112
+ target_uuid: targetUuid,
113
+ action: body.action,
114
+ with_children: body.with_children,
115
+ new_doc_ids: newDocIds,
116
+ message: "成功复制目录节点到目标知识库(附件已服务端重传) / Successfully copied catalog node (attachments re-uploaded)",
117
+ }, null, 2) }],
118
+ };
119
+ },
120
+ };
121
+ //# sourceMappingURL=copy-catalog-node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy-catalog-node.js","sourceRoot":"","sources":["../../src/web-doc/copy-catalog-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD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aAAa;wBACjC,WAAW,EAAE,SAAS;wBACtB,OAAO,EAAE,uFAAuF;qBACjG,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACf,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -4,5 +4,7 @@ export { webRepoList } from "./list-repos.js";
4
4
  export { webTocGet } from "./get-toc.js";
5
5
  export { webDocDelete } from "./delete-doc.js";
6
6
  export { webBatchMoveCatalogNodes } from "./batch-move-catalog-nodes.js";
7
+ export { webMoveCatalogNode } from "./move-catalog-node.js";
8
+ export { webCopyCatalogNode } from "./copy-catalog-node.js";
7
9
  import type { McpTool } from "../common/types.js";
8
10
  export declare const webDocTools: McpTool[];
@@ -4,11 +4,15 @@ export { webRepoList } from "./list-repos.js";
4
4
  export { webTocGet } from "./get-toc.js";
5
5
  export { webDocDelete } from "./delete-doc.js";
6
6
  export { webBatchMoveCatalogNodes } from "./batch-move-catalog-nodes.js";
7
+ export { webMoveCatalogNode } from "./move-catalog-node.js";
8
+ export { webCopyCatalogNode } from "./copy-catalog-node.js";
7
9
  import { webDocGet } from "./get-doc.js";
8
10
  import { webDocList } from "./list-docs.js";
9
11
  import { webRepoList } from "./list-repos.js";
10
12
  import { webTocGet } from "./get-toc.js";
11
13
  import { webDocDelete } from "./delete-doc.js";
12
14
  import { webBatchMoveCatalogNodes } from "./batch-move-catalog-nodes.js";
13
- export const webDocTools = [webDocGet, webDocList, webRepoList, webTocGet, webDocDelete, webBatchMoveCatalogNodes];
15
+ import { webMoveCatalogNode } from "./move-catalog-node.js";
16
+ import { webCopyCatalogNode } from "./copy-catalog-node.js";
17
+ export const webDocTools = [webDocGet, webDocList, webRepoList, webTocGet, webDocDelete, webBatchMoveCatalogNodes, webMoveCatalogNode, webCopyCatalogNode];
14
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/web-doc/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MA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AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,CAAC,MAAM,WAAW,GAAc,CAAC,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * web-doc/move-catalog-node — Cookie 态移动单个目录节点(支持跨库 + 带子树)
3
+ *
4
+ * 端点:PUT /api/catalog_nodes/move(Web API,Cookie 认证)
5
+ * 职责:将单个目录节点移动到目标目录/目标知识库下。
6
+ *
7
+ * 相比 batch 版的优势:
8
+ * - 支持跨知识库移动(target_book_id 可 != book_id)
9
+ * - 支持 with_children 连带子节点整棵子树移动
10
+ * - 单节点语义,字段与原 web 端完全对齐
11
+ */
12
+ import type { McpTool } from "../common/types.js";
13
+ export declare const webMoveCatalogNode: McpTool;
@@ -0,0 +1,112 @@
1
+ /**
2
+ * web-doc/move-catalog-node — Cookie 态移动单个目录节点(支持跨库 + 带子树)
3
+ *
4
+ * 端点:PUT /api/catalog_nodes/move(Web API,Cookie 认证)
5
+ * 职责:将单个目录节点移动到目标目录/目标知识库下。
6
+ *
7
+ * 相比 batch 版的优势:
8
+ * - 支持跨知识库移动(target_book_id 可 != book_id)
9
+ * - 支持 with_children 连带子节点整棵子树移动
10
+ * - 单节点语义,字段与原 web 端完全对齐
11
+ */
12
+ import { isErrorResult } from "../common/api-client.js";
13
+ import { webRequest } from "../common/web-request.js";
14
+ import { check, requiredString, optionalString, optionalBoolean } from "../common/validate.js";
15
+ const MOVE_REFERER = "https://www.yuque.com/";
16
+ export const webMoveCatalogNode = {
17
+ name: "yuque_web_move_catalog_node",
18
+ description: "Cookie-based: Move a single catalog node to a target catalog node / target repo. " +
19
+ "PUT /api/catalog_nodes/move. " +
20
+ "Supports cross-repo move (target_book_id may differ from book_id) and moving the whole subtree (with_children). " +
21
+ "No membership required. " +
22
+ "详见 references/api/catalog_api.md",
23
+ inputSchema: {
24
+ type: "object",
25
+ properties: {
26
+ book_id: {
27
+ type: "string",
28
+ description: "Source repository ID (numeric, required). The repo the node currently lives in.",
29
+ },
30
+ node_uuid: {
31
+ type: "string",
32
+ description: "Catalog node UUID to move (required).",
33
+ },
34
+ target_book_id: {
35
+ type: "string",
36
+ description: "Target repository ID (numeric). For cross-repo move set this to the destination repo. Defaults to book_id (same-repo move).",
37
+ },
38
+ target_uuid: {
39
+ type: "string",
40
+ description: "Target catalog node UUID to move into. Leave empty / null to move to the root of the target repo.",
41
+ },
42
+ action: {
43
+ type: "string",
44
+ description: "Move action. Default 'prependChild'. Common values: prependChild (as first child), appendChild (as last child).",
45
+ },
46
+ with_children: {
47
+ type: "boolean",
48
+ description: "Move the whole subtree (all descendant nodes) together. Default true.",
49
+ },
50
+ insert_to_catalog: {
51
+ type: "boolean",
52
+ description: "Whether to insert into the catalog/TOC. Default true.",
53
+ },
54
+ },
55
+ required: ["book_id", "node_uuid"],
56
+ },
57
+ async handler(args) {
58
+ // @validate
59
+ const __v = check(requiredString(args?.book_id, "book_id"), requiredString(args?.node_uuid, "node_uuid"), optionalString(args?.target_book_id, "target_book_id"), optionalString(args?.target_uuid, "target_uuid"), optionalString(args?.action, "action"), optionalBoolean(args?.with_children, "with_children"), optionalBoolean(args?.insert_to_catalog, "insert_to_catalog"));
60
+ if (__v)
61
+ return __v;
62
+ const bookId = Number(args?.book_id);
63
+ if (!bookId) {
64
+ return {
65
+ content: [{ type: "text", text: JSON.stringify({ error: "book_id 必须为有效数字 / book_id must be a valid number" }, null, 2) }],
66
+ isError: true,
67
+ };
68
+ }
69
+ // target_book_id 缺省 = book_id(同库移动);填了则支持跨库
70
+ const targetBookIdRaw = args?.target_book_id?.trim();
71
+ const targetBookId = targetBookIdRaw ? Number(targetBookIdRaw) : bookId;
72
+ if (!targetBookId) {
73
+ return {
74
+ content: [{ type: "text", text: JSON.stringify({ error: "target_book_id 必须为有效数字 / target_book_id must be a valid number" }, null, 2) }],
75
+ isError: true,
76
+ };
77
+ }
78
+ // target_uuid 留空 → null(移动到目标库根目录)
79
+ const targetUuid = args?.target_uuid?.trim() || null;
80
+ const body = {
81
+ book_id: bookId,
82
+ node_uuid: args.node_uuid,
83
+ target_uuid: targetUuid,
84
+ action: args?.action?.trim() || "prependChild",
85
+ target_book_id: targetBookId,
86
+ with_children: args?.with_children ?? true,
87
+ insert_to_catalog: args?.insert_to_catalog ?? true,
88
+ };
89
+ const url = "https://www.yuque.com/api/catalog_nodes/move";
90
+ const result = await webRequest(url, {
91
+ method: "PUT",
92
+ body,
93
+ referer: MOVE_REFERER,
94
+ });
95
+ if (isErrorResult(result))
96
+ return result;
97
+ return {
98
+ content: [{ type: "text", text: JSON.stringify({
99
+ success: true,
100
+ book_id: bookId,
101
+ target_book_id: targetBookId,
102
+ node_uuid: args.node_uuid,
103
+ target_uuid: targetUuid,
104
+ action: body.action,
105
+ with_children: body.with_children,
106
+ cross_repo: targetBookId !== bookId,
107
+ message: `成功移动目录节点到目标位置(${targetBookId !== bookId ? "跨库" : "同库"}) / Successfully moved catalog node (${targetBookId !== bookId ? "cross-repo" : "same-repo"})`,
108
+ }, null, 2) }],
109
+ };
110
+ },
111
+ };
112
+ //# sourceMappingURL=move-catalog-node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"move-catalog-node.js","sourceRoot":"","sources":["../../src/web-doc/move-catalog-node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA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covering the entire Yuque OpenAPI",
3
+ "version": "2.13.0",
4
+ "description": "Full-featured Yuque MCP Server — 62 fine-grained tools covering the entire Yuque OpenAPI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
@@ -23,7 +23,7 @@
23
23
  "ai",
24
24
  "llm",
25
25
  "claude",
26
- "\u8bed\u96c0"
26
+ "语雀"
27
27
  ],
28
28
  "scripts": {
29
29
  "build": "tsc",
@@ -46,4 +46,4 @@
46
46
  "tsx": "^4.22.4",
47
47
  "typescript": "^5.4.0"
48
48
  }
49
- }
49
+ }