tencent-docs
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese腾讯文档 MCP 使用指南
Tencent Docs MCP Usage Guide
腾讯文档 MCP 提供了一套完整的在线文档操作工具,支持创建、查询、编辑多种类型的在线文档。
Tencent Docs MCP provides a complete set of online document operation tools, supporting the creation, query and editing of multiple types of online documents.
📚 详细参考文档
📚 Detailed Reference Documents
如需查看每个工具的详细调用示例、参数说明和返回值说明,请参考:
- - 包含所有工具的完整调用示例、参数说明、返回值说明及 API 结构、枚举值说明
references/api_references.md - - 智能表格(SmartSheet)专项参考文档,包含字段类型枚举、字段值格式参考、典型工作流示例及所有
references/smartsheet_references.md工具的详细说明smartsheet.* - - 智能文档(SmartCanvas)专项参考文档,包含元素类型说明、富文本格式枚举、典型工作流示例及所有
references/smartcanvas_references.md工具的详细说明smartcanvas.*
For detailed call examples, parameter descriptions and return value explanations of each tool, please refer to:
- - Contains complete call examples, parameter descriptions, return value explanations, as well as API structure and enumeration value explanations for all tools
references/api_references.md - - Special reference document for SmartSheet, including field type enumerations, field value format references, typical workflow examples and detailed explanations of all
references/smartsheet_references.mdtoolssmartsheet.* - - Special reference document for SmartCanvas, including element type explanations, rich text format enumerations, typical workflow examples and detailed explanations of all
references/smartcanvas_references.mdtoolssmartcanvas.*
⚙️ 配置要求
⚙️ Configuration Requirements
根据你所使用的环境,选择对应的配置方式:
Choose the corresponding configuration method according to your environment:
✅ 场景一:CodeBuddy / 其他 IDE(推荐)
✅ Scenario 1: CodeBuddy / Other IDEs (Recommended)
无需额外安装,在 IDE 的 MCP 配置中添加腾讯文档服务即可直接使用。
配置步骤:
- 访问 https://docs.qq.com/open/document/mcp/get-token/ 获取你的个人 Token
- 在 IDE 的 MCP 配置中添加以下服务:
json
{
"mcpServers": {
"tencent-docs": {
"url": "https://docs.qq.com/openapi/mcp",
"headers": {
"Authorization": "你的Token值"
}
}
}
}⚠️ 重要:Header 的 key 必须使用,不能使用其他名称(如Authorization、token、auth等),否则鉴权将失败。X-Token
- 配置完成后,即可在 IDE 中直接调用所有腾讯文档工具,无需任何额外步骤。
No additional installation required, you can directly use it by adding the Tencent Docs service in the IDE's MCP configuration.
Configuration Steps:
- Visit https://docs.qq.com/open/document/mcp/get-token/ to obtain your personal Token
- Add the following service in the IDE's MCP configuration:
json
{
"mcpServers": {
"tencent-docs": {
"url": "https://docs.qq.com/openapi/mcp",
"headers": {
"Authorization": "Your Token Value"
}
}
}
}⚠️ Important: The key of the Header must be, do not use other names (such asAuthorization,token,auth, etc.), otherwise authentication will fail.X-Token
- After configuration is completed, you can directly call all Tencent Docs tools in the IDE without any additional steps.
🔧 场景二:OpenClaw(需要安装)
🔧 Scenario 2: OpenClaw (Requires Installation)
在 OpenClaw 中使用时,需要先完成本地安装和注册。
安装步骤:
- 访问 https://docs.qq.com/open/document/mcp/get-token/ 获取 Token,并配置环境变量:
bash
export TENCENT_DOCS_TOKEN="你的Token值"- 运行 setup.sh 完成 MCP 服务注册:
bash
bash setup.shsetup.sh 会自动将腾讯文档 MCP 服务注册到 mcporter,并验证配置是否成功。 如果未执行 setup,所有工具调用将无法找到服务。tencent-docs
- 验证安装是否成功:
bash
mcporter list | grep tencent-docs⚠️ 如果用户未配置 Token,请引导用户访问上方链接获取 Token,否则所有工具调用将返回鉴权失败。
When using in OpenClaw, you need to complete local installation and registration first.
Installation Steps:
- Visit https://docs.qq.com/open/document/mcp/get-token/ to obtain the Token, and configure the environment variable:
bash
export TENCENT_DOCS_TOKEN="Your Token Value"- Run setup.sh to complete MCP service registration:
bash
bash setup.shsetup.sh will automatically register the Tencent Docs MCP service to mcporter and verify whether the configuration is successful. If setup is not executed, all tool calls will fail to find theservice.tencent-docs
- Verify whether the installation is successful:
bash
mcporter list | grep tencent-docs⚠️ If the user has not configured the Token, please guide the user to visit the above link to obtain the Token, otherwise all tool calls will return authentication failure.
🔧 调用方式
🔧 Calling Method
腾讯文档 MCP 的标准配置名称为 ,通过内置 MCP Client 直接调用工具:
tencent-docsmcp: tencent-docs
tool: <工具名称>
arguments: { ... }The standard configuration name of Tencent Docs MCP is , call tools directly through the built-in MCP Client:
tencent-docsmcp: tencent-docs
tool: <Tool Name>
arguments: { ... }支持的工具完整列表
Complete List of Supported Tools
⚠️ 以下工具列表仅供参考,实际可用工具以调用接口返回结果为准。tools/list获取最新工具列表:mcp: tencent-docs method: tools/list
| 工具名称 | MCP 调用格式 | 功能说明 |
|---|---|---|
| create_smartcanvas_by_markdown | | ⭐ 创建智能文档(首选) |
| create_excel_by_markdown | | 创建 Excel 表格 |
| create_slide_by_markdown | | 创建幻灯片 |
| create_mind_by_markdown | | 创建思维导图 |
| create_flowchart_by_mermaid | | 创建流程图 |
| create_word_by_markdown | | 创建 Word 文档 |
| query_space_node | | 查询空间节点 |
| create_space_node | | 创建空间节点 |
| delete_space_node | | 删除空间节点 |
| search_space_file | | 搜索空间文件 |
| get_content | | 获取文档内容 |
| batch_update_sheet_range | | 批量更新表格 |
| smartcanvas.* | 见下方第 4 节 | 智能文档元素操作(页面/文本/标题/待办事项),详见 |
| smartsheet.* | 见下方第 5 节 | 智能表格操作(工作表/视图/字段/记录),详见 |
详细调用示例请参考:
references/api_references.md⚠️ The following tool list is for reference only, the actual available tools are subject to the results returned by calling theinterface.tools/listGet the latest tool list:mcp: tencent-docs method: tools/list
| Tool Name | MCP Call Format | Function Description |
|---|---|---|
| create_smartcanvas_by_markdown | | ⭐ Create SmartCanvas (Recommended) |
| create_excel_by_markdown | | Create Excel Spreadsheet |
| create_slide_by_markdown | | Create Slide |
| create_mind_by_markdown | | Create Mind Map |
| create_flowchart_by_mermaid | | Create Flowchart |
| create_word_by_markdown | | Create Word Document |
| query_space_node | | Query Space Node |
| create_space_node | | Create Space Node |
| delete_space_node | | Delete Space Node |
| search_space_file | | Search Space File |
| get_content | | Get Document Content |
| batch_update_sheet_range | | Batch Update Spreadsheet |
| smartcanvas.* | See Section 4 below | SmartCanvas Element Operations (Page/Text/Heading/To-Do Item), see |
| smartsheet.* | See Section 5 below | SmartSheet Operations (Worksheet/View/Field/Record), see |
For detailed call examples, please refer to:
references/api_references.md⭐ 重要:文档类型选择指南
⭐ Important: Document Type Selection Guide
首选推荐:智能文档(smartcanvas)
- 新增文档:优先使用
创建智能文档,原因如下:create_smartcanvas_by_markdown
- 📝 排版效果更美观,自动优化布局
- 🎨 支持更丰富的格式(标题、段落、列表、表格、代码块、引用、图片等)
- 📱 跨平台显示效果一致
- 编辑已有文档:使用
系列工具对已有智能文档进行增删改查操作,详见smartcanvas.*references/smartcanvas_references.md
Highly Recommended: SmartCanvas
- New Document: Prioritize using
to create SmartCanvas, for the following reasons:create_smartcanvas_by_markdown
- 📝 More beautiful layout with automatically optimized arrangement
- 🎨 Supports richer formats (headings, paragraphs, lists, tables, code blocks, quotes, images, etc.)
- 📱 Consistent display effect across platforms
- Edit Existing Document: Use
series tools to perform CRUD operations on existing SmartCanvas, seesmartcanvas.*for detailsreferences/smartcanvas_references.md
文档类型选择决策树
Document Type Selection Decision Tree
需要创建什么类型的内容?
│
├─ 新增通用文档内容(报告、笔记、文章等)
│ └─ ✅ 使用 create_smartcanvas_by_markdown(首选)
│
├─ 编辑/追加已有智能文档内容
│ └─ ✅ 使用 smartcanvas.* 工具(详见 `references/smartcanvas_references.md`)
│
├─ 数据表格(需要计算、筛选、统计)
│ └─ ✅ 使用 create_excel_by_markdown
│
├─ 演示文稿(需要逐页展示、投影演示)
│ └─ ✅ 使用 create_slide_by_markdown
│
├─ 层次化知识整理(知识图谱、大纲)
│ └─ ✅ 使用 create_mind_by_markdown
│
├─ 流程/架构展示(流程图、时序图)
│ └─ ✅ 使用 create_flowchart_by_mermaid
│
├─ 结构化数据管理(多视图、字段管理、看板)
│ └─ ✅ 使用 smartsheet.* 工具(详见 `references/smartsheet_references.md`)
│
└─ 传统 Word 格式导出需求
└─ 使用 create_word_by_markdown(仅在明确需要时)What type of content do you need to create?
│
├─ New general document content (reports, notes, articles, etc.)
│ └─ ✅ Use create_smartcanvas_by_markdown (Recommended)
│
├─ Edit/append content to existing SmartCanvas
│ └─ ✅ Use smartcanvas.* tools (see `references/smartcanvas_references.md` for details)
│
├─ Data spreadsheet (requires calculation, filtering, statistics)
│ └─ ✅ Use create_excel_by_markdown
│
├─ Presentation (requires page-by-page display, projection presentation)
│ └─ ✅ Use create_slide_by_markdown
│
├─ Hierarchical knowledge organization (knowledge graph, outline)
│ └─ ✅ Use create_mind_by_markdown
│
├─ Process/architecture display (flowchart, sequence diagram)
│ └─ ✅ Use create_flowchart_by_mermaid
│
├─ Structured data management (multi-view, field management, kanban)
│ └─ ✅ Use smartsheet.* tools (see `references/smartsheet_references.md` for details)
│
└─ Traditional Word format export requirement
└─ Use create_word_by_markdown (only when explicitly needed)支持的文档类型
Supported Document Types
| 类型 | doc_type | 推荐度 | 说明 |
|---|---|---|---|
| 智能文档 | smartcanvas | ⭐⭐⭐ 首选 | 排版美观,支持丰富组件 |
| Excel | excel | ⭐⭐⭐ | 数据表格专用 |
| 幻灯片 | slide | ⭐⭐⭐ | 演示文稿专用 |
| 思维导图 | mind | ⭐⭐⭐ | 知识图谱专用 |
| 流程图 | flowchart | ⭐⭐⭐ | 流程展示专用 |
| Word | word | ⭐⭐ | 传统格式,排版一般 |
| 收集表 | form | ⭐⭐ | 表单收集 |
| 智能表格 | smartsheet | ⭐⭐⭐ | 高级结构化表格,支持多视图、字段管理 |
| 白板 | board | ⭐⭐ | 在线白板 |
| Type | doc_type | Recommendation | Description |
|---|---|---|---|
| SmartCanvas | smartcanvas | ⭐⭐⭐ Recommended | Beautiful layout, supports rich components |
| Excel | excel | ⭐⭐⭐ | Specialized for data spreadsheets |
| Slide | slide | ⭐⭐⭐ | Specialized for presentations |
| Mind Map | mind | ⭐⭐⭐ | Specialized for knowledge graphs |
| Flowchart | flowchart | ⭐⭐⭐ | Specialized for process display |
| Word | word | ⭐⭐ | Traditional format with average layout |
| Form | form | ⭐⭐ | Form collection |
| SmartSheet | smartsheet | ⭐⭐⭐ | Advanced structured spreadsheet, supports multi-view and field management |
| Board | board | ⭐⭐ | Online whiteboard |
工具列表
Tool List
📖 所有工具的完整调用示例、参数说明和返回值说明,请查阅references/api_references.md⚠️ 此 skill 中的工具列表仅作使用指导,实际可用工具以调用接口返回结果为准。 如遇工具不存在或参数不符,请先执行tools/list获取最新工具定义。tools/list
📖 For complete call examples, parameter descriptions and return value explanations of all tools, please refer toreferences/api_references.md⚠️ The tool list in this skill is only for usage guidance, the actual available tools are subject to the results returned by calling theinterface. If a tool does not exist or parameters do not match, please executetools/listfirst to get the latest tool definition.tools/list
1. 创建文档类
1. Document Creation Tools
⭐ create_smartcanvas_by_markdown(首选)
⭐ create_smartcanvas_by_markdown (Recommended)
通用文档首选工具,通过 Markdown 创建智能文档,排版美观,支持所有 Markdown 基本结构。
适用场景:
- 📄 文档、报告、笔记、文章
- 📋 会议纪要、方案说明
- 📚 技术文档、教程
- 🗒️ 任何需要美观排版的内容
支持 参数:可指定父节点 ID,将文档创建到指定目录下;不填则在根目录创建。
parent_id📖 调用示例请参考:- create_smartcanvas_by_markdownreferences/api_references.md
Recommended tool for general documents, create SmartCanvas via Markdown with beautiful layout, supporting all basic Markdown structures.
Applicable Scenarios:
- 📄 Documents, reports, notes, articles
- 📋 Meeting minutes, program descriptions
- 📚 Technical documents, tutorials
- 🗒️ Any content requiring beautiful layout
Supports parameter: You can specify the parent node ID to create the document in the specified directory; if not filled, it will be created in the root directory.
parent_id📖 For call examples, please refer to:- create_smartcanvas_by_markdownreferences/api_references.md
create_excel_by_markdown
create_excel_by_markdown
通过 Markdown 表格创建 Excel,适用于需要数据计算、筛选的场景。
适用场景:数据报表、统计表格、需要公式计算的场景
支持 参数:可指定父节点 ID,将文档创建到指定目录下;不填则在根目录创建。
parent_id📖 调用示例请参考:- create_excel_by_markdownreferences/api_references.md
Create Excel via Markdown table, suitable for scenarios requiring data calculation and filtering.
Applicable Scenarios: Data reports, statistical spreadsheets, scenarios requiring formula calculation
Supports parameter: You can specify the parent node ID to create the document in the specified directory; if not filled, it will be created in the root directory.
parent_id📖 For call examples, please refer to:- create_excel_by_markdownreferences/api_references.md
create_slide_by_markdown
create_slide_by_markdown
通过 Markdown 创建幻灯片,遵循特定层级结构( 主标题 → 章节 → 页面 → 段落 → 缩进子项正文)。
######-适用场景:演示文稿、项目汇报、培训材料
支持 参数:可指定父节点 ID,将文档创建到指定目录下;不填则在根目录创建。
parent_id📖 调用示例请参考:- create_slide_by_markdownreferences/api_references.md
Create Slide via Markdown, following a specific hierarchical structure ( Main Title → Chapter → Page → Paragraph → Indented Sub-item Content).
######-Applicable Scenarios: Presentations, project reports, training materials
Supports parameter: You can specify the parent node ID to create the document in the specified directory; if not filled, it will be created in the root directory.
parent_id📖 For call examples, please refer to:- create_slide_by_markdownreferences/api_references.md
create_mind_by_markdown
create_mind_by_markdown
通过 Markdown 创建思维导图,使用标题层级和列表嵌套表示结构。
适用场景:知识图谱、大纲整理、头脑风暴
支持 参数:可指定父节点 ID,将文档创建到指定目录下;不填则在根目录创建。
parent_id📖 调用示例请参考:- create_mind_by_markdownreferences/api_references.md
Create Mind Map via Markdown, using heading levels and list nesting to represent the structure.
Applicable Scenarios: Knowledge graphs, outline organization, brainstorming
Supports parameter: You can specify the parent node ID to create the document in the specified directory; if not filled, it will be created in the root directory.
parent_id📖 For call examples, please refer to:- create_mind_by_markdownreferences/api_references.md
create_flowchart_by_mermaid
create_flowchart_by_mermaid
通过 Mermaid 语法创建流程图,mermaid 字段内容必须全部使用英文。
适用场景:流程图、时序图、架构图
支持 参数:可指定父节点 ID,将文档创建到指定目录下;不填则在根目录创建。
parent_id📖 调用示例请参考:- create_flowchart_by_mermaidreferences/api_references.md
Create Flowchart via Mermaid syntax, the content of the mermaid field must be in English entirely.
Applicable Scenarios: Flowcharts, sequence diagrams, architecture diagrams
Supports parameter: You can specify the parent node ID to create the document in the specified directory; if not filled, it will be created in the root directory.
parent_id📖 For call examples, please refer to:- create_flowchart_by_mermaidreferences/api_references.md
create_word_by_markdown
create_word_by_markdown
通过 Markdown 创建 Word 文档。注意:仅在用户明确要求 Word 格式时使用,否则请使用 smartcanvas。
支持 参数:可指定父节点 ID,将文档创建到指定目录下;不填则在根目录创建。
parent_id📖 调用示例请参考:- create_word_by_markdownreferences/api_references.md
Create Word Document via Markdown. Note: Use only when the user explicitly requires Word format, otherwise use SmartCanvas.
Supports parameter: You can specify the parent node ID to create the document in the specified directory; if not filled, it will be created in the root directory.
parent_id📖 For call examples, please refer to:- create_word_by_markdownreferences/api_references.md
2. 空间管理类
2. Workspace Management Tools
query_space_node
query_space_node
查询空间节点树结构,获取文件夹和文档列表。支持分页,每页返回 20 条。
📖 调用示例请参考:- query_space_nodereferences/api_references.md
Query the space node tree structure to get the list of folders and documents. Supports pagination, returns 20 items per page.
📖 For call examples, please refer to:- query_space_nodereferences/api_references.md
create_space_node
create_space_node
在空间中创建新节点,支持创建文件夹()、在线文档()、链接()。
wiki_folderwiki_tdoclink📖 调用示例请参考:- create_space_nodereferences/api_references.md
Create a new node in the space, supporting the creation of folders (), online documents (), and links ().
wiki_folderwiki_tdoclink📖 For call examples, please refer to:- create_space_nodereferences/api_references.md
search_space_file
search_space_file
在空间内搜索文档,支持按关键词匹配标题和内容,支持分页,每页返回 40 条。
⚠️ 注意:仅能搜索到文档类节点(word、excel、slide 等),无法搜索文件夹;如需查找文件夹,请使用遍历节点树。query_space_node
📖 调用示例请参考:- search_space_filereferences/api_references.md
Search documents in the space, supports keyword matching of titles and content, supports pagination, returns 40 items per page.
⚠️ Note: Only document-type nodes (word, excel, slide, etc.) can be searched, folders cannot be searched; if you need to find folders, please useto traverse the node tree.query_space_node
📖 For call examples, please refer to:- search_space_filereferences/api_references.md
delete_space_node
delete_space_node
删除空间中的指定节点,支持两种删除模式。
删除类型(remove_type):
- (默认):仅删除当前节点,子节点自动挂载到上级节点
current - :删除当前节点及其所有子节点(⚠️ 谨慎使用,会递归删除所有子节点)
all
📖 调用示例请参考:- delete_space_nodereferences/api_references.md
Delete the specified node in the space, supporting two deletion modes.
Deletion Type (remove_type):
- (default): Only delete the current node, child nodes will be automatically mounted to the parent node
current - : Delete the current node and all its child nodes (⚠️ Use with caution, will recursively delete all child nodes)
all
📖 For call examples, please refer to:- delete_space_nodereferences/api_references.md
3. 文档操作类
3. Document Operation Tools
get_content
get_content
获取文档完整内容,传入 返回文档正文文本。
file_id📖 调用示例请参考:- get_contentreferences/api_references.md
Get the complete content of the document, pass in to return the document body text.
file_id📖 For call examples, please refer to:- get_contentreferences/api_references.md
batch_update_sheet_range
batch_update_sheet_range
批量更新表格单元格内容(仅适用于 Excel),数据从表格末尾追加,不覆盖已有内容。
📖 调用示例请参考:- batch_update_sheet_rangereferences/api_references.md
Batch update spreadsheet cell content (only applicable to Excel), data is appended from the end of the spreadsheet without overwriting existing content.
📖 For call examples, please refer to:- batch_update_sheet_rangereferences/api_references.md
smartcanvas.create_smartcanvas_element
smartcanvas.create_smartcanvas_element
在已有智能文档中新增元素,支持添加页面(Page)、文本(Text)、标题(Heading)、待办事项(Task)等多种类型元素。
元素层级约束:
- 、
Text、Task必须挂载在Heading类型父节点下(Page必填)parent_id - 可不指定父节点,插入到根节点
Page - 父节点不支持为 类型
Heading
📖 完整说明请参考:- smartcanvas.create_smartcanvas_elementreferences/smartcanvas_references.md
Add elements to an existing SmartCanvas, supporting the addition of multiple types of elements such as Page, Text, Heading, Task, etc.
Element Hierarchy Constraints:
- ,
Text,Taskmust be mounted under aHeadingtype parent node (Pageis required)parent_id - does not need to specify a parent node, it will be inserted into the root node
Page - Parent node does not support type
Heading
📖 For complete description, please refer to:- smartcanvas.create_smartcanvas_elementreferences/smartcanvas_references.md
smartcanvas.get_element_info
smartcanvas.get_element_info
批量查询指定元素的详细信息,支持同时查询多个元素的内容、类型、父子关系等。
📖 完整说明请参考:- smartcanvas.get_element_inforeferences/smartcanvas_references.md
Batch query detailed information of specified elements, supporting simultaneous query of content, type, parent-child relationship, etc. of multiple elements.
📖 For complete description, please refer to:- smartcanvas.get_element_inforeferences/smartcanvas_references.md
smartcanvas.get_page_info
smartcanvas.get_page_info
查询指定页面内的所有元素,支持分页获取。使用 参数进行分页, 表示已获取全部内容。
cursoris_over=true📖 完整说明请参考:- smartcanvas.get_page_inforeferences/smartcanvas_references.md
Query all elements in the specified page, supports pagination acquisition. Use the parameter for pagination, indicates that all content has been obtained.
cursoris_over=true📖 For complete description, please refer to:- smartcanvas.get_page_inforeferences/smartcanvas_references.md
smartcanvas.get_top_level_pages
smartcanvas.get_top_level_pages
查询文档的所有顶层页面列表,返回根节点下的直接子页面,用于了解文档目录结构。
📖 完整说明请参考:- smartcanvas.get_top_level_pagesreferences/smartcanvas_references.md
Query the list of all top-level pages of the document, returns the direct child pages under the root node, used to understand the document directory structure.
📖 For complete description, please refer to:- smartcanvas.get_top_level_pagesreferences/smartcanvas_references.md
smartcanvas.update_element
smartcanvas.update_element
批量修改元素内容,支持同时更新多个元素的文本、格式、标题级别、页面标题等属性。
📖 完整说明请参考:- smartcanvas.update_elementreferences/smartcanvas_references.md
Batch modify element content, supporting simultaneous update of attributes such as text, format, heading level, page title of multiple elements.
📖 For complete description, please refer to:- smartcanvas.update_elementreferences/smartcanvas_references.md
smartcanvas.delete_element
smartcanvas.delete_element
批量删除元素,支持同时删除多个指定元素。
⚠️ 删除 Page 元素时,其下所有子元素也会被一并删除,请谨慎操作。
📖 完整说明请参考:- smartcanvas.delete_elementreferences/smartcanvas_references.md
Batch delete elements, supporting simultaneous deletion of multiple specified elements.
⚠️ When deleting a Page element, all its child elements will also be deleted, please use with caution.
📖 For complete description, please refer to:- smartcanvas.delete_elementreferences/smartcanvas_references.md
smartcanvas.append_insert_smartcanvas_by_markdown
smartcanvas.append_insert_smartcanvas_by_markdown
通过 Markdown 文本向已有智能文档追加内容,内容追加到文档末尾。
📖 完整说明请参考:- smartcanvas.append_insert_smartcanvas_by_markdownreferences/smartcanvas_references.md
Append content to an existing SmartCanvas via Markdown text, content is appended to the end of the document.
📖 For complete description, please refer to:- smartcanvas.append_insert_smartcanvas_by_markdownreferences/smartcanvas_references.md
4. 智能文档(SmartCanvas)元素操作类
4. SmartCanvas Element Operation Tools
智能文档支持对页面、文本、标题、待办事项等元素进行完整的增删改查操作,共 7 个工具()。
smartcanvas.*📖 所有工具的完整说明(使用场景、元素类型定义、枚举值、参数示例)请查阅:references/smartcanvas_references.md包含:元素新增、元素查询、页面内容查询、顶层页面查询、元素修改、元素删除、Markdown 追加,以及标题级别枚举、颜色枚举、富文本格式说明、典型工作流示例。
SmartCanvas supports complete CRUD operations on elements such as pages, text, headings, to-do items, with a total of 7 tools ().
smartcanvas.*📖 For complete description of all tools (usage scenarios, element type definitions, enumerations, parameter examples), please refer to:references/smartcanvas_references.mdIncludes: element addition, element query, page content query, top-level page query, element modification, element deletion, Markdown append, as well as heading level enumerations, color enumerations, rich text format descriptions, typical workflow examples.
5. 智能表格(SmartSheet)操作类
5. SmartSheet Operation Tools
智能表格支持对工作表、视图、字段、记录进行完整的增删改查操作,共 12 个工具()。
smartsheet.*📖 所有工具的完整说明(使用场景、字段定义、枚举值、参数示例)请查阅:references/smartsheet_references.md包含:工作表操作、视图操作、字段操作、记录操作,以及字段类型枚举、字段值格式参考、典型工作流示例。
SmartSheet supports complete CRUD operations on worksheets, views, fields, records, with a total of 12 tools ().
smartsheet.*📖 For complete description of all tools (usage scenarios, field definitions, enumerations, parameter examples), please refer to:references/smartsheet_references.mdIncludes: worksheet operations, view operations, field operations, record operations, as well as field type enumerations, field value format references, typical workflow examples.
常见工作流
Common Workflows
创建通用文档(推荐方式)
Create General Document (Recommended Method)
1. 优先调用 create_smartcanvas_by_markdown 创建智能文档
2. 从返回结果中获取 file_id 和 url1. Prioritize calling create_smartcanvas_by_markdown to create SmartCanvas
2. Get file_id and url from the returned result编辑已有智能文档
Edit Existing SmartCanvas
1. 调用 smartcanvas.get_top_level_pages 获取文档页面结构
2. 按需调用 smartcanvas.* 工具进行增删改查:
- 追加内容:smartcanvas.append_insert_smartcanvas_by_markdown(Markdown 方式)
- 新增元素:smartcanvas.create_smartcanvas_element
- 查询元素:smartcanvas.get_element_info / smartcanvas.get_page_info
- 修改元素:smartcanvas.update_element
- 删除元素:smartcanvas.delete_element1. Call smartcanvas.get_top_level_pages to get the document page structure
2. Call smartcanvas.* tools to perform CRUD operations as needed:
- Append content: smartcanvas.append_insert_smartcanvas_by_markdown (Markdown method)
- Add elements: smartcanvas.create_smartcanvas_element
- Query elements: smartcanvas.get_element_info / smartcanvas.get_page_info
- Modify elements: smartcanvas.update_element
- Delete elements: smartcanvas.delete_element组织文档到指定目录
Organize Documents into Specified Directory
- 调用 查找目标文件夹
query_space_node - 调用 在目标位置创建文档节点(doc_type 优先选择 smartcanvas)
create_space_node
- Call to find the target folder
query_space_node - Call to create a document node in the target location (prefer smartcanvas as doc_type)
create_space_node
搜索并读取文档
Search and Read Document
- 调用 搜索文档
search_space_file - 从结果中获取 (即
node_id)file_id - 调用 获取文档内容
get_content
- Call to search for documents
search_space_file - Get (i.e.,
node_id) from the resultsfile_id - Call to get the document content
get_content
智能表格操作工作流
SmartSheet Operation Workflow
从零搭建任务管理表
Build Task Management Sheet from Scratch
1. 获取工作表列表 → smartsheet.list_tables(获取 sheet_id)
2. 添加字段(列)→ smartsheet.add_fields(任务名称、优先级、截止日期等)
3. 批量写入数据 → smartsheet.add_records
4. (可选)创建看板视图 → smartsheet.add_view(view_type=2)1. Get worksheet list → smartsheet.list_tables (get sheet_id)
2. Add fields (columns) → smartsheet.add_fields (task name, priority, deadline, etc.)
3. Batch write data → smartsheet.add_records
4. (Optional) Create kanban view → smartsheet.add_view (view_type=2)查询并更新数据
Query and Update Data
1. 获取工作表 → smartsheet.list_tables
2. 查询记录 → smartsheet.list_records(获取 record_id)
3. 更新记录 → smartsheet.update_records(传入 record_id 和新字段值)📖 更多智能表格工作流示例请参考:- 典型工作流示例references/smartsheet_references.md
1. Get worksheet → smartsheet.list_tables
2. Query records → smartsheet.list_records (get record_id)
3. Update records → smartsheet.update_records (pass in record_id and new field values)📖 For more SmartSheet workflow examples, please refer to:- Typical Workflow Examplesreferences/smartsheet_references.md
注意事项
Notes
- 默认使用 smartcanvas:除非用户明确指定其他格式,否则新增文档时优先使用 ;编辑已有智能文档时使用
create_smartcanvas_by_markdown系列工具smartcanvas.* - 创建文档时支持 :所有
parent_id和create_*_by_markdown工具均支持create_flowchart_by_mermaid参数,可将文档直接创建到指定目录;不填则在根目录创建parent_id - 删除节点:默认仅删除当前节点(
delete_space_node),使用remove_type=current时会递归删除所有子节点,需谨慎all - Markdown 内容使用 UTF-8 格式,特殊字符无需转义
- 幻灯片必须遵循层级结构,每页包含 2-4 个段落标题
- 分页查询每页返回 20-40 条记录,使用 判断是否有更多
has_next - 同时也是文档的
node_idfile_id - 的 mermaid 内容必须全部使用英文
create_flowchart_by_mermaid - 智能文档元素操作:、
Text、Heading必须挂载在Task下,Page必须为 Page 类型元素 ID;操作前先调用parent_id获取页面结构smartcanvas.get_top_level_pages - 智能文档分页查询:使用
smartcanvas.get_page_info分页,cursor表示已获取全部内容is_over=true - 智能文档删除注意:删除 Page 元素时,其下所有子元素也会被一并删除
- 智能表格操作:所有 smartsheet.* 工具都需要 和
file_id,操作前先调用sheet_id获取 sheet_idsmartsheet.list_tables - 字段类型不可更新:时 field_type 不能修改,但必须传入原值
update_fields - 记录字段值格式:不同字段类型的值格式不同,详见 - 字段值格式参考
references/smartsheet_references.md
- Default to use SmartCanvas: Unless the user explicitly specifies another format, prioritize using when creating new documents; use
create_smartcanvas_by_markdownseries tools when editing existing SmartCanvassmartcanvas.* - supported when creating documents: All
parent_idandcreate_*_by_markdowntools support thecreate_flowchart_by_mermaidparameter, which can directly create documents in the specified directory; if not filled, it will be created in the root directoryparent_id - Delete node: only deletes the current node by default (
delete_space_node), usingremove_type=currentwill recursively delete all child nodes, please use with cautionall - Markdown content uses UTF-8 format, no need to escape special characters
- Slides must follow the hierarchical structure, each page contains 2-4 paragraph headings
- Pagination query returns 20-40 records per page, use to determine if there are more
has_next - is also the
node_idof the documentfile_id - The mermaid content of must be in English entirely
create_flowchart_by_mermaid - SmartCanvas Element Operations: ,
Text,Headingmust be mounted under Page,Taskmust be the ID of a Page type element; callparent_idto get the page structure before operationsmartcanvas.get_top_level_pages - SmartCanvas Pagination Query: uses
smartcanvas.get_page_infofor pagination,cursorindicates that all content has been obtainedis_over=true - SmartCanvas Deletion Note: When deleting a Page element, all its child elements will also be deleted
- SmartSheet Operations: All smartsheet.* tools require and
file_id, callsheet_idto get sheet_id before operationsmartsheet.list_tables - Field type cannot be updated: When using , field_type cannot be modified, but the original value must be passed in
update_fields - Record field value format: The value format varies for different field types, see - Field Value Format Reference for details
references/smartsheet_references.md