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

如需查看每个工具的详细调用示例、参数说明和返回值说明,请参考:
  • references/api_references.md
    - 包含所有工具的完整调用示例、参数说明、返回值说明及 API 结构、枚举值说明
  • references/smartsheet_references.md
    - 智能表格(SmartSheet)专项参考文档,包含字段类型枚举、字段值格式参考、典型工作流示例及所有
    smartsheet.*
    工具的详细说明
  • references/smartcanvas_references.md
    - 智能文档(SmartCanvas)专项参考文档,包含元素类型说明、富文本格式枚举、典型工作流示例及所有
    smartcanvas.*
    工具的详细说明
For detailed call examples, parameter descriptions and return value explanations of each tool, please refer to:
  • references/api_references.md
    - Contains complete call examples, parameter descriptions, return value explanations, as well as API structure and enumeration value explanations for all tools
  • references/smartsheet_references.md
    - Special reference document for SmartSheet, including field type enumerations, field value format references, typical workflow examples and detailed explanations of all
    smartsheet.*
    tools
  • references/smartcanvas_references.md
    - Special reference document for SmartCanvas, including element type explanations, rich text format enumerations, typical workflow examples and detailed explanations of all
    smartcanvas.*
    tools

⚙️ 配置要求

⚙️ Configuration Requirements

根据你所使用的环境,选择对应的配置方式:
Choose the corresponding configuration method according to your environment:

✅ 场景一:CodeBuddy / 其他 IDE(推荐)

✅ Scenario 1: CodeBuddy / Other IDEs (Recommended)

无需额外安装,在 IDE 的 MCP 配置中添加腾讯文档服务即可直接使用。
配置步骤:
  1. 访问 https://docs.qq.com/open/document/mcp/get-token/ 获取你的个人 Token
  2. 在 IDE 的 MCP 配置中添加以下服务:
json
{
  "mcpServers": {
    "tencent-docs": {
      "url": "https://docs.qq.com/openapi/mcp",
      "headers": {
        "Authorization": "你的Token值"
      }
    }
  }
}
⚠️ 重要:Header 的 key 必须使用
Authorization
,不能使用其他名称(如
token
auth
X-Token
等),否则鉴权将失败。
  1. 配置完成后,即可在 IDE 中直接调用所有腾讯文档工具,无需任何额外步骤。

No additional installation required, you can directly use it by adding the Tencent Docs service in the IDE's MCP configuration.
Configuration Steps:
  1. Visit https://docs.qq.com/open/document/mcp/get-token/ to obtain your personal Token
  2. 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
Authorization
, do not use other names (such as
token
,
auth
,
X-Token
, etc.), otherwise authentication will fail.
  1. 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 中使用时,需要先完成本地安装和注册。
安装步骤:
  1. 访问 https://docs.qq.com/open/document/mcp/get-token/ 获取 Token,并配置环境变量:
bash
export TENCENT_DOCS_TOKEN="你的Token值"
  1. 运行 setup.sh 完成 MCP 服务注册:
bash
bash setup.sh
setup.sh 会自动将腾讯文档 MCP 服务注册到 mcporter,并验证配置是否成功。 如果未执行 setup,所有工具调用将无法找到
tencent-docs
服务。
  1. 验证安装是否成功:
bash
mcporter list | grep tencent-docs
⚠️ 如果用户未配置 Token,请引导用户访问上方链接获取 Token,否则所有工具调用将返回鉴权失败。

When using in OpenClaw, you need to complete local installation and registration first.
Installation Steps:
  1. 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"
  1. Run setup.sh to complete MCP service registration:
bash
bash setup.sh
setup.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 the
tencent-docs
service.
  1. 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 的标准配置名称为
tencent-docs
,通过内置 MCP Client 直接调用工具:
mcp: tencent-docs
tool: <工具名称>
arguments: { ... }
The standard configuration name of Tencent Docs MCP is
tencent-docs
, call tools directly through the built-in MCP Client:
mcp: 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_smartcanvas_by_markdown
⭐ 创建智能文档(首选)
create_excel_by_markdown
create_excel_by_markdown
创建 Excel 表格
create_slide_by_markdown
create_slide_by_markdown
创建幻灯片
create_mind_by_markdown
create_mind_by_markdown
创建思维导图
create_flowchart_by_mermaid
create_flowchart_by_mermaid
创建流程图
create_word_by_markdown
create_word_by_markdown
创建 Word 文档
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_content
获取文档内容
batch_update_sheet_range
batch_update_sheet_range
批量更新表格
smartcanvas.*见下方第 4 节智能文档元素操作(页面/文本/标题/待办事项),详见
references/smartcanvas_references.md
smartsheet.*见下方第 5 节智能表格操作(工作表/视图/字段/记录),详见
references/smartsheet_references.md
详细调用示例请参考:
references/api_references.md
⚠️ The following tool list is for reference only, the actual available tools are subject to the results returned by calling the
tools/list
interface.
Get the latest tool list:
mcp: tencent-docs
method: tools/list
Tool NameMCP Call FormatFunction Description
create_smartcanvas_by_markdown
create_smartcanvas_by_markdown
⭐ Create SmartCanvas (Recommended)
create_excel_by_markdown
create_excel_by_markdown
Create Excel Spreadsheet
create_slide_by_markdown
create_slide_by_markdown
Create Slide
create_mind_by_markdown
create_mind_by_markdown
Create Mind Map
create_flowchart_by_mermaid
create_flowchart_by_mermaid
Create Flowchart
create_word_by_markdown
create_word_by_markdown
Create Word Document
query_space_node
query_space_node
Query Space Node
create_space_node
create_space_node
Create Space Node
delete_space_node
delete_space_node
Delete Space Node
search_space_file
search_space_file
Search Space File
get_content
get_content
Get Document Content
batch_update_sheet_range
batch_update_sheet_range
Batch Update Spreadsheet
smartcanvas.*See Section 4 belowSmartCanvas Element Operations (Page/Text/Heading/To-Do Item), see
references/smartcanvas_references.md
for details
smartsheet.*See Section 5 belowSmartSheet Operations (Worksheet/View/Field/Record), see
references/smartsheet_references.md
for details
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
    create_smartcanvas_by_markdown
    to create SmartCanvas, for the following reasons:
    • 📝 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
    smartcanvas.*
    series tools to perform CRUD operations on existing SmartCanvas, see
    references/smartcanvas_references.md
    for details

文档类型选择决策树

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⭐⭐⭐ 首选排版美观,支持丰富组件
Excelexcel⭐⭐⭐数据表格专用
幻灯片slide⭐⭐⭐演示文稿专用
思维导图mind⭐⭐⭐知识图谱专用
流程图flowchart⭐⭐⭐流程展示专用
Wordword⭐⭐传统格式,排版一般
收集表form⭐⭐表单收集
智能表格smartsheet⭐⭐⭐高级结构化表格,支持多视图、字段管理
白板board⭐⭐在线白板
Typedoc_typeRecommendationDescription
SmartCanvassmartcanvas⭐⭐⭐ RecommendedBeautiful layout, supports rich components
Excelexcel⭐⭐⭐Specialized for data spreadsheets
Slideslide⭐⭐⭐Specialized for presentations
Mind Mapmind⭐⭐⭐Specialized for knowledge graphs
Flowchartflowchart⭐⭐⭐Specialized for process display
Wordword⭐⭐Traditional format with average layout
Formform⭐⭐Form collection
SmartSheetsmartsheet⭐⭐⭐Advanced structured spreadsheet, supports multi-view and field management
Boardboard⭐⭐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 to
references/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 the
tools/list
interface.
If a tool does not exist or parameters do not match, please execute
tools/list
first to get the latest tool definition.

1. 创建文档类

1. Document Creation Tools

⭐ create_smartcanvas_by_markdown(首选)

⭐ create_smartcanvas_by_markdown (Recommended)

通用文档首选工具,通过 Markdown 创建智能文档,排版美观,支持所有 Markdown 基本结构。
适用场景
  • 📄 文档、报告、笔记、文章
  • 📋 会议纪要、方案说明
  • 📚 技术文档、教程
  • 🗒️ 任何需要美观排版的内容
支持
parent_id
参数
:可指定父节点 ID,将文档创建到指定目录下;不填则在根目录创建。
📖 调用示例请参考:
references/api_references.md
- create_smartcanvas_by_markdown
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
parent_id
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.
📖 For call examples, please refer to:
references/api_references.md
- create_smartcanvas_by_markdown

create_excel_by_markdown

create_excel_by_markdown

通过 Markdown 表格创建 Excel,适用于需要数据计算、筛选的场景。
适用场景:数据报表、统计表格、需要公式计算的场景
支持
parent_id
参数
:可指定父节点 ID,将文档创建到指定目录下;不填则在根目录创建。
📖 调用示例请参考:
references/api_references.md
- create_excel_by_markdown
Create Excel via Markdown table, suitable for scenarios requiring data calculation and filtering.
Applicable Scenarios: Data reports, statistical spreadsheets, scenarios requiring formula calculation
Supports
parent_id
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.
📖 For call examples, please refer to:
references/api_references.md
- create_excel_by_markdown

create_slide_by_markdown

create_slide_by_markdown

通过 Markdown 创建幻灯片,遵循特定层级结构(
#
主标题 →
##
章节 →
###
页面 →
-
段落 → 缩进子项正文)。
适用场景:演示文稿、项目汇报、培训材料
支持
parent_id
参数
:可指定父节点 ID,将文档创建到指定目录下;不填则在根目录创建。
📖 调用示例请参考:
references/api_references.md
- create_slide_by_markdown
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
parent_id
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.
📖 For call examples, please refer to:
references/api_references.md
- create_slide_by_markdown

create_mind_by_markdown

create_mind_by_markdown

通过 Markdown 创建思维导图,使用标题层级和列表嵌套表示结构。
适用场景:知识图谱、大纲整理、头脑风暴
支持
parent_id
参数
:可指定父节点 ID,将文档创建到指定目录下;不填则在根目录创建。
📖 调用示例请参考:
references/api_references.md
- create_mind_by_markdown
Create Mind Map via Markdown, using heading levels and list nesting to represent the structure.
Applicable Scenarios: Knowledge graphs, outline organization, brainstorming
Supports
parent_id
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.
📖 For call examples, please refer to:
references/api_references.md
- create_mind_by_markdown

create_flowchart_by_mermaid

create_flowchart_by_mermaid

通过 Mermaid 语法创建流程图,mermaid 字段内容必须全部使用英文。
适用场景:流程图、时序图、架构图
支持
parent_id
参数
:可指定父节点 ID,将文档创建到指定目录下;不填则在根目录创建。
📖 调用示例请参考:
references/api_references.md
- create_flowchart_by_mermaid
Create Flowchart via Mermaid syntax, the content of the mermaid field must be in English entirely.
Applicable Scenarios: Flowcharts, sequence diagrams, architecture diagrams
Supports
parent_id
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.
📖 For call examples, please refer to:
references/api_references.md
- create_flowchart_by_mermaid

create_word_by_markdown

create_word_by_markdown

通过 Markdown 创建 Word 文档。注意:仅在用户明确要求 Word 格式时使用,否则请使用 smartcanvas
支持
parent_id
参数
:可指定父节点 ID,将文档创建到指定目录下;不填则在根目录创建。
📖 调用示例请参考:
references/api_references.md
- create_word_by_markdown
Create Word Document via Markdown. Note: Use only when the user explicitly requires Word format, otherwise use SmartCanvas.
Supports
parent_id
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.
📖 For call examples, please refer to:
references/api_references.md
- create_word_by_markdown

2. 空间管理类

2. Workspace Management Tools

query_space_node

query_space_node

查询空间节点树结构,获取文件夹和文档列表。支持分页,每页返回 20 条。
📖 调用示例请参考:
references/api_references.md
- query_space_node
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:
references/api_references.md
- query_space_node

create_space_node

create_space_node

在空间中创建新节点,支持创建文件夹(
wiki_folder
)、在线文档(
wiki_tdoc
)、链接(
link
)。
📖 调用示例请参考:
references/api_references.md
- create_space_node
Create a new node in the space, supporting the creation of folders (
wiki_folder
), online documents (
wiki_tdoc
), and links (
link
).
📖 For call examples, please refer to:
references/api_references.md
- create_space_node

search_space_file

search_space_file

在空间内搜索文档,支持按关键词匹配标题和内容,支持分页,每页返回 40 条。
⚠️ 注意:仅能搜索到文档类节点(word、excel、slide 等),无法搜索文件夹;如需查找文件夹,请使用
query_space_node
遍历节点树。
📖 调用示例请参考:
references/api_references.md
- search_space_file
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 use
query_space_node
to traverse the node tree.
📖 For call examples, please refer to:
references/api_references.md
- search_space_file

delete_space_node

delete_space_node

删除空间中的指定节点,支持两种删除模式。
删除类型(remove_type)
  • current
    (默认):仅删除当前节点,子节点自动挂载到上级节点
  • all
    :删除当前节点及其所有子节点(⚠️ 谨慎使用,会递归删除所有子节点)
📖 调用示例请参考:
references/api_references.md
- delete_space_node
Delete the specified node in the space, supporting two deletion modes.
Deletion Type (remove_type):
  • current
    (default): Only delete the current node, child nodes will be automatically mounted to the parent node
  • all
    : Delete the current node and all its child nodes (⚠️ Use with caution, will recursively delete all child nodes)
📖 For call examples, please refer to:
references/api_references.md
- delete_space_node

3. 文档操作类

3. Document Operation Tools

get_content

get_content

获取文档完整内容,传入
file_id
返回文档正文文本。
📖 调用示例请参考:
references/api_references.md
- get_content
Get the complete content of the document, pass in
file_id
to return the document body text.
📖 For call examples, please refer to:
references/api_references.md
- get_content

batch_update_sheet_range

batch_update_sheet_range

批量更新表格单元格内容(仅适用于 Excel),数据从表格末尾追加,不覆盖已有内容。
📖 调用示例请参考:
references/api_references.md
- batch_update_sheet_range
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:
references/api_references.md
- batch_update_sheet_range

smartcanvas.create_smartcanvas_element

smartcanvas.create_smartcanvas_element

在已有智能文档中新增元素,支持添加页面(Page)、文本(Text)、标题(Heading)、待办事项(Task)等多种类型元素。
元素层级约束
  • Text
    Task
    Heading
    必须挂载在
    Page
    类型父节点下(
    parent_id
    必填)
  • Page
    可不指定父节点,插入到根节点
  • 父节点不支持为
    Heading
    类型
📖 完整说明请参考:
references/smartcanvas_references.md
- smartcanvas.create_smartcanvas_element
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
    ,
    Task
    ,
    Heading
    must be mounted under a
    Page
    type parent node (
    parent_id
    is required)
  • Page
    does not need to specify a parent node, it will be inserted into the root node
  • Parent node does not support
    Heading
    type
📖 For complete description, please refer to:
references/smartcanvas_references.md
- smartcanvas.create_smartcanvas_element

smartcanvas.get_element_info

smartcanvas.get_element_info

批量查询指定元素的详细信息,支持同时查询多个元素的内容、类型、父子关系等。
📖 完整说明请参考:
references/smartcanvas_references.md
- smartcanvas.get_element_info
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:
references/smartcanvas_references.md
- smartcanvas.get_element_info

smartcanvas.get_page_info

smartcanvas.get_page_info

查询指定页面内的所有元素,支持分页获取。使用
cursor
参数进行分页,
is_over=true
表示已获取全部内容。
📖 完整说明请参考:
references/smartcanvas_references.md
- smartcanvas.get_page_info
Query all elements in the specified page, supports pagination acquisition. Use the
cursor
parameter for pagination,
is_over=true
indicates that all content has been obtained.
📖 For complete description, please refer to:
references/smartcanvas_references.md
- smartcanvas.get_page_info

smartcanvas.get_top_level_pages

smartcanvas.get_top_level_pages

查询文档的所有顶层页面列表,返回根节点下的直接子页面,用于了解文档目录结构。
📖 完整说明请参考:
references/smartcanvas_references.md
- smartcanvas.get_top_level_pages
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:
references/smartcanvas_references.md
- smartcanvas.get_top_level_pages

smartcanvas.update_element

smartcanvas.update_element

批量修改元素内容,支持同时更新多个元素的文本、格式、标题级别、页面标题等属性。
📖 完整说明请参考:
references/smartcanvas_references.md
- smartcanvas.update_element
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:
references/smartcanvas_references.md
- smartcanvas.update_element

smartcanvas.delete_element

smartcanvas.delete_element

批量删除元素,支持同时删除多个指定元素。
⚠️ 删除 Page 元素时,其下所有子元素也会被一并删除,请谨慎操作。
📖 完整说明请参考:
references/smartcanvas_references.md
- smartcanvas.delete_element
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:
references/smartcanvas_references.md
- smartcanvas.delete_element

smartcanvas.append_insert_smartcanvas_by_markdown

smartcanvas.append_insert_smartcanvas_by_markdown

通过 Markdown 文本向已有智能文档追加内容,内容追加到文档末尾。
📖 完整说明请参考:
references/smartcanvas_references.md
- smartcanvas.append_insert_smartcanvas_by_markdown
Append content to an existing SmartCanvas via Markdown text, content is appended to the end of the document.
📖 For complete description, please refer to:
references/smartcanvas_references.md
- smartcanvas.append_insert_smartcanvas_by_markdown

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.md
Includes: 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.md
Includes: 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 和 url
1. 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_element
1. 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

  1. 调用
    query_space_node
    查找目标文件夹
  2. 调用
    create_space_node
    在目标位置创建文档节点(doc_type 优先选择 smartcanvas)
  1. Call
    query_space_node
    to find the target folder
  2. Call
    create_space_node
    to create a document node in the target location (prefer smartcanvas as doc_type)

搜索并读取文档

Search and Read Document

  1. 调用
    search_space_file
    搜索文档
  2. 从结果中获取
    node_id
    (即
    file_id
  3. 调用
    get_content
    获取文档内容
  1. Call
    search_space_file
    to search for documents
  2. Get
    node_id
    (i.e.,
    file_id
    ) from the results
  3. Call
    get_content
    to get the document 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:
references/smartsheet_references.md
- Typical Workflow Examples

注意事项

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_id
    同时也是文档的
    file_id
  • create_flowchart_by_mermaid
    的 mermaid 内容必须全部使用英文
  • 智能文档元素操作
    Text
    Heading
    Task
    必须挂载在
    Page
    下,
    parent_id
    必须为 Page 类型元素 ID;操作前先调用
    smartcanvas.get_top_level_pages
    获取页面结构
  • 智能文档分页查询
    smartcanvas.get_page_info
    使用
    cursor
    分页,
    is_over=true
    表示已获取全部内容
  • 智能文档删除注意:删除 Page 元素时,其下所有子元素也会被一并删除
  • 智能表格操作:所有 smartsheet.* 工具都需要
    file_id
    sheet_id
    ,操作前先调用
    smartsheet.list_tables
    获取 sheet_id
  • 字段类型不可更新
    update_fields
    时 field_type 不能修改,但必须传入原值
  • 记录字段值格式:不同字段类型的值格式不同,详见
    references/smartsheet_references.md
    - 字段值格式参考
  • Default to use SmartCanvas: Unless the user explicitly specifies another format, prioritize using
    create_smartcanvas_by_markdown
    when creating new documents
    ; use
    smartcanvas.*
    series tools when editing existing SmartCanvas
  • parent_id
    supported when creating documents
    : All
    create_*_by_markdown
    and
    create_flowchart_by_mermaid
    tools support the
    parent_id
    parameter, which can directly create documents in the specified directory; if not filled, it will be created in the root directory
  • Delete node:
    delete_space_node
    only deletes the current node by default (
    remove_type=current
    ), using
    all
    will recursively delete all child nodes, please use with caution
  • 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
    has_next
    to determine if there are more
  • node_id
    is also the
    file_id
    of the document
  • The mermaid content of
    create_flowchart_by_mermaid
    must be in English entirely
  • SmartCanvas Element Operations:
    Text
    ,
    Heading
    ,
    Task
    must be mounted under Page,
    parent_id
    must be the ID of a Page type element; call
    smartcanvas.get_top_level_pages
    to get the page structure before operation
  • SmartCanvas Pagination Query:
    smartcanvas.get_page_info
    uses
    cursor
    for pagination,
    is_over=true
    indicates that all content has been obtained
  • SmartCanvas Deletion Note: When deleting a Page element, all its child elements will also be deleted
  • SmartSheet Operations: All smartsheet.* tools require
    file_id
    and
    sheet_id
    , call
    smartsheet.list_tables
    to get sheet_id before operation
  • Field type cannot be updated: When using
    update_fields
    , field_type cannot be modified, but the original value must be passed in
  • Record field value format: The value format varies for different field types, see
    references/smartsheet_references.md
    - Field Value Format Reference for details