yuque-document-management

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

语雀文档管理

YuQue Document Management

通过YuQue MCP工具管理语雀知识库文档。本技能专注于MCP工具的使用要点和常见操作模式。
Manage YuQue knowledge base documents via the YuQue MCP tool. This skill focuses on the key usage points and common operation modes of the MCP tool.

MCP工具概览

MCP Tool Overview

所有操作都通过YuQue MCP工具完成:
  • mcp_YuQueMCP_get_default_repository
    - 获取默认知识库信息
  • mcp_YuQueMCP_get_repository_toc_tree
    - 获取完整目录树结构
  • mcp_YuQueMCP_search
    - 搜索文档
  • mcp_YuQueMCP_create_document
    - 创建新文档
  • mcp_YuQueMCP_get_document
    - 读取文档内容
  • mcp_YuQueMCP_update_document
    - 更新文档内容或标题
  • mcp_YuQueMCP_move_document
    - 移动文档到其他目录
  • mcp_YuQueMCP_delete_document
    - 删除文档
All operations are performed via the YuQue MCP tool:
  • mcp_YuQueMCP_get_default_repository
    - Get default knowledge base information
  • mcp_YuQueMCP_get_repository_toc_tree
    - Get complete directory tree structure
  • mcp_YuQueMCP_search
    - Search documents
  • mcp_YuQueMCP_create_document
    - Create new documents
  • mcp_YuQueMCP_get_document
    - Read document content
  • mcp_YuQueMCP_update_document
    - Update document content or title
  • mcp_YuQueMCP_move_document
    - Move documents to other directories
  • mcp_YuQueMCP_delete_document
    - Delete documents

基本操作要点

Basic Operation Points

创建文档

Create Document

步骤:
  1. 获取目录结构:
    mcp_YuQueMCP_get_repository_toc_tree
    了解组织方式
  2. 确定位置:选择合适的
    parentUuid
    或使用根目录(null)
  3. 准备内容:使用Markdown格式
  4. 创建文档:调用
    mcp_YuQueMCP_create_document
    ,参数:
    • title
      (必需):文档标题
    • body
      (可选):Markdown格式的文档内容
    • parentUuid
      (可选):父目录UUID
要点:
  • 同一目录下标题必须唯一
  • 内容使用标准Markdown语法
  • 不指定parentUuid则创建在根目录
Steps:
  1. Get directory structure: Use
    mcp_YuQueMCP_get_repository_toc_tree
    to understand the organization
  2. Determine location: Select an appropriate
    parentUuid
    or use the root directory (null)
  3. Prepare content: Use Markdown format
  4. Create document: Call
    mcp_YuQueMCP_create_document
    with parameters:
    • title
      (required): Document title
    • body
      (optional): Document content in Markdown format
    • parentUuid
      (optional): Parent directory UUID
Key Points:
  • Titles must be unique in the same directory
  • Use standard Markdown syntax for content
  • If
    parentUuid
    is not specified, the document will be created in the root directory

搜索文档

Search Documents

使用:
mcp_YuQueMCP_search query="搜索关键词" type="DOC" page=1
参数说明:
  • query
    (必需):搜索关键词
  • type
    (可选):文档类型过滤
  • page
    (可选):分页页码
要点:
  • 使用具体关键词而非通用术语
  • 可组合多个关键词提高精确度
  • 大结果集使用分页
Usage:
mcp_YuQueMCP_search query="search keywords" type="DOC" page=1
Parameter Description:
  • query
    (required): Search keywords
  • type
    (optional): Document type filter
  • page
    (optional): Pagination page number
Key Points:
  • Use specific keywords instead of general terms
  • Combine multiple keywords to improve accuracy
  • Use pagination for large result sets

更新文档

Update Document

使用:
mcp_YuQueMCP_update_document docId="文档ID" body="新内容" title="新标题"
参数说明:
  • docId
    (必需):文档ID
  • body
    (可选):新的文档内容
  • title
    (可选):新的文档标题
要点:
  • 至少提供body或title之一
  • 更新后验证更改是否生效
  • 确认文档ID正确
Usage:
mcp_YuQueMCP_update_document docId="document ID" body="new content" title="new title"
Parameter Description:
  • docId
    (required): Document ID
  • body
    (optional): New document content
  • title
    (optional): New document title
Key Points:
  • Provide at least either
    body
    or
    title
  • Verify that changes take effect after update
  • Confirm the document ID is correct

移动文档

Move Document

使用:
mcp_YuQueMCP_move_document docId="文档ID" parentUuid="目标父目录UUID"
要点:
  • parentUuid为null则移到根目录
  • 确认目标目录存在
  • 避免循环引用(不能移到自己的子目录)
Usage:
mcp_YuQueMCP_move_document docId="document ID" parentUuid="target parent directory UUID"
Key Points:
  • If
    parentUuid
    is null, move to the root directory
  • Confirm the target directory exists
  • Avoid circular references (cannot move to its own subdirectory)

删除文档

Delete Document

使用:
mcp_YuQueMCP_delete_document docId="文档ID"
要点:
  • 删除操作不可逆,需确认
  • 验证文档ID正确
  • 删除前可先备份内容
Usage:
mcp_YuQueMCP_delete_document docId="document ID"
Key Points:
  • Deletion is irreversible, confirm before proceeding
  • Verify the document ID is correct
  • Backup content before deletion if needed

常见工作流

Common Workflows

文档创建流程

Document Creation Workflow

  1. 查看结构
    get_repository_toc_tree
    了解现有组织
  2. 确定位置:选择合适的父目录UUID
  3. 准备内容:编写Markdown格式内容
  4. 创建文档:调用
    create_document
  5. 验证结果:确认文档出现在预期位置
  1. View Structure: Use
    get_repository_toc_tree
    to understand existing organization
  2. Determine Location: Select appropriate parent directory UUID
  3. Prepare Content: Write content in Markdown format
  4. Create Document: Call
    create_document
  5. Verify Result: Confirm the document appears in the expected location

文档组织流程

Document Organization Workflow

  1. 获取当前结构
    get_repository_toc_tree
    查看完整目录树
  2. 识别需要移动的文档:确定重组目标
  3. 执行移动:使用
    move_document
    重新定位
  4. 验证结构:移动后重新获取目录树确认
  1. Get Current Structure: Use
    get_repository_toc_tree
    to view the complete directory tree
  2. Identify Documents to Move: Determine restructuring goals
  3. Execute Move: Use
    move_document
    to reposition
  4. Verify Structure: Re-fetch the directory tree after moving to confirm

错误处理要点

Error Handling Key Points

常见错误

Common Errors

文档创建失败:
  • 检查标题在目标目录是否唯一
  • 验证Markdown语法正确
  • 确认parentUuid存在
搜索无结果:
  • 尝试更广泛或替代关键词
  • 检查拼写和术语
  • 验证文档可见性/权限
移动失败:
  • 确认目标parentUuid存在
  • 检查源文档是否存在
  • 验证无循环引用
Document Creation Failed:
  • Check if the title is unique in the target directory
  • Verify Markdown syntax is correct
  • Confirm
    parentUuid
    exists
No Search Results:
  • Try broader or alternative keywords
  • Check spelling and terminology
  • Verify document visibility/permissions
Move Failed:
  • Confirm the target
    parentUuid
    exists
  • Check if the source document exists
  • Verify no circular references

错误处理模式

Error Handling Mode

python
try:
    result = mcp_YuQueMCP_create_document(title="标题", body="内容")
except Exception as e:
    # 记录错误
    # 实现重试逻辑
    # 提供用户反馈
python
try:
    result = mcp_YuQueMCP_create_document(title="Title", body="Content")
except Exception as e:
    # Log error
    # Implement retry logic
    # Provide user feedback

使用最佳实践

Usage Best Practices

操作前准备

Pre-Operation Preparation

  1. 获取知识库信息:先调用
    get_default_repository
    了解知识库
  2. 查看目录结构:使用
    get_repository_toc_tree
    规划组织方式
  3. 搜索验证:创建前搜索确认文档不存在
  1. Get Knowledge Base Information: First call
    get_default_repository
    to understand the knowledge base
  2. View Directory Structure: Use
    get_repository_toc_tree
    to plan organization
  3. Search Verification: Search to confirm the document does not exist before creation

内容规范

Content Specifications

  • 使用清晰、描述性的标题
  • 内容使用标准Markdown格式
  • 保持文档大小适中(避免超大文档)
  • 相关文档组织在同一目录
  • Use clear, descriptive titles
  • Use standard Markdown format for content
  • Keep document size moderate (avoid oversized documents)
  • Organize related documents in the same directory

协作注意

Collaboration Notes

  • 设置合适的可见性权限
  • 重大变更使用版本命名
  • 移动文档前与团队协调
  • 定期清理过时内容
  • Set appropriate visibility permissions
  • Use version naming for major changes
  • Coordinate with the team before moving documents
  • Regularly clean up outdated content

工具参数速查

Tool Parameter Quick Reference

工具必需参数可选参数说明
create_document
title
body
,
parentUuid
创建文档
get_document
docId
-读取文档
update_document
docId
body
,
title
更新文档
move_document
docId
parentUuid
移动文档
delete_document
docId
-删除文档
search
query
type
,
page
搜索文档
get_repository_toc_tree
--获取目录树
get_default_repository
--获取知识库信息
ToolRequired ParametersOptional ParametersDescription
create_document
title
body
,
parentUuid
Create document
get_document
docId
-Read document
update_document
docId
body
,
title
Update document
move_document
docId
parentUuid
Move document
delete_document
docId
-Delete document
search
query
type
,
page
Search documents
get_repository_toc_tree
--Get directory tree
get_default_repository
--Get knowledge base information

参考文档

Reference Documents

需要详细信息时查看:
  • references/mcp-tools.md - 完整MCP工具参考
  • references/troubleshooting.md - 错误排查指南
For detailed information, refer to:
  • references/mcp-tools.md - Complete MCP tool reference
  • references/troubleshooting.md - Troubleshooting guide