Before using the SKILL each day, perform an update check by following these steps:
- Check the current version version: read the
versionfield in the frontmatter at the top of this file; the format is MAJOR.MINOR.PATCH - Check the latest version latest: obtain the latest version information via a command
latest, with the input parameterversionbeing the current version obtained in the previous step
mcporter call "https://docs.qq.com/openapi/mcp" "check_skill_update" --args '{"version": "当前版本"}'
Data is returned in JSON format; example return parameters:
latest: the latest version number, in the format MAJOR.MINOR.PATCHrelease_note: the latest version release notesinstruction: the update instruction
- Update the version: if the current version
versionis lower than the latest versionlatest, then follow theinstructioninstruction to update, or prompt the user to update
Tencent Docs MCP provides a complete set of online document operation tools, supporting the creation, querying, and editing of various types of online documents.
Supported document types
| Type | doc_type | Recommendation level | Description |
|---|---|---|---|
| Document | smartcanvas | ⭐⭐⭐ Preferred | Beautiful layout, supports rich components, supports MDX advanced layout formats |
| Excel | excel | ⭐⭐⭐ | Dedicated for data tables |
| PPT | slide | ⭐⭐⭐ | Dedicated for slides and presentations |
| Mind map | mind | ⭐⭐⭐ | Dedicated for knowledge graphs |
| Flowchart | flowchart | ⭐⭐⭐ | Dedicated for process display |
| Word | word | ⭐⭐ | Traditional format, ordinary layout |
| Form | form | ⭐⭐ | Form collection |
| Smart sheet | smartsheet | ⭐⭐⭐ | Advanced structured spreadsheet, supports multiple views and field management |
| Whiteboard | board | ⭐⭐ | Online whiteboard |
Detailed API Reference Documentation
First, you need to read the file references/api_references.md to view the complete API descriptions of all tools; this file contains complete tool call examples, parameter descriptions, return value descriptions, and API structure and enum value descriptions
🎯 Scenario-based Document Guide
According to your specific task scenario, select the corresponding reference document for consultation:
- Scenario: document-related scenarios such as reports, notes, articles, summaries, etc.; select Document
smartcanvas- Create a document: use the
create_smartcanvas_by_mdxtool (MDX format, supports advanced layout such as columns, highlight blocks, to-do lists, tables, etc.); read the guide filereferences/mdx_references.mdto learn the MDX component specifications - Edit an existing document: use the
smartcanvas.*series of tools to operate elements such as pages, text, headings, to-do items, etc.; read the guide filereferences/smartcanvas_references.md
- Create a document: use the
- Scenario: structured data management-related scenarios; select Smart Sheet
smartsheet- Read the guide file
references/smartsheet_references.md, which supports operating elements such as fields, records, views, etc. through thesmartsheet.*series of tools
- Read the guide file
- Scenario: scenarios related to calculations, filtering, statistics, and Excel operations; select Online Spreadsheet
sheet- Read the guide file
sheet/entry.md, supports operation throughsheet.*series tools to manipulate tables, range data, batch update cells and other elements
- Read the guide file
- Scenario: Operations related to generating professional and standardized documents such as papers, assignments, official documents, contracts, notices, and style-enhanced documents; select Word document
doc- Read the entry file
doc/entry.mdto understand the overall capabilities and workflow, supports execution throughdoc.*series tools for document writing, beautification, and other operations
- Read the entry file
- Scenario: Fine-grained editing operations on existing Word documents (insert text, replace text, find text, insert paragraphs, insert images, insert tables, modify text styles, insert tasks, etc.); select Word document editing
tencent-docengine- Read the guide file
references/docengine_references.md, docengine is an independent MCP service (tencent-docengine, API address:https://docs.qq.com/api/v6/doc/mcp), invoked throughmcporter call tencent-docengine <工具名>, tool names such asfind、insert_text、replace_text, etc. (without prefix) - ⚠️ Token description: tencent-docengine and tencent-docs use the same Token; after completing tencent-docs authorization, it can be used directly without separate configuration
- Read the guide file
- Scenario: PPT file presentations, scenarios requiring page-by-page display and projection presentation; select presentation
slide- Read the guide file
references/api_references.md, supports creating slides through thecreate_slidetool (AI automatically generates content, asynchronous interface), and needs to work with theslide_progresstool to poll progress (poll once every 20 seconds, maximum wait 20 minutes) - ⚠️ Important: Slide generation usually takes 10~15 minutes; it is recommended to use spawn sub-sessiondedicated polling: (1) The main session immediately tells the user "started" after submitting the task; (2) the spawned sub-session checks once every 20 seconds, each time checking the generation status and reporting it to the main session, and automatically cleans up and outputs a timeout status when timed out; (3) the main session receives the sub-session status and formats the output for the user
- When the status is
completed, obtainfile_urlfrom the response and inform the user
- Read the guide file
- Scenario: Hierarchical knowledge organization (knowledge graph, outline); select mind map
mind- Read the guide file
references/api_references.md, supports operation throughmindrelated tools to manipulate mind maps, mind map pages, mind map elements and other elements
- Read the guide file
- Scenario: Process/architecture display (flowchart, sequence diagram); select flowchart
flowchart- Read the guide file
references/api_references.md, supports operation throughflowchartrelated tools to manipulate flowcharts, flowchart pages, flowchart elements and other elements
- Read the guide file
- Scenario: Whiteboard presentation scenarios; select whiteboard
board- Read the guide file
references/api_references.md, supports creating a whiteboard through thecreate_space_nodetool
- Read the guide file
- Scenario: Data collection and filling, etc.; select collection form
form- Read the guide file
references/api_references.md, supports creating a collection form through thecreate_space_nodetool
- Read the guide file
- For other general scenarios, select document
smartcanvas
⚙️ Quick configuration
When installing and using for the first time, local installation and registration must be completed first; see references/auth.md。
🔧 Invocation method
Get the complete tool list
- Use
mcporter list tencent-docsto get the tool list and parameter Schema - Read
references/View the reference documentation in the directory for call examples, return value structures, and precautions
⚠️ The parameter descriptions in the reference documentation should be consistent with the MCP tool Schema. If there is any conflict, refer to the
mcporter list tencent-docsreturned Schema.
Tool list example
| Tool name | Function description | Reference documentation to read |
|---|---|---|
| create_smartcanvas_by_mdx | Create smart document (MDX format, advanced layout) | references/mdx_references.md references/api_references.md |
| create_excel_by_markdown | Create Excel spreadsheet | references/api_references.md |
| create_slide | Create slides (AI-generated automatically, asynchronous API, requires polling with slide_progress every 20 seconds; recommended spawn child sessiondedicated polling: after the main session submits, immediately tell the user "started"; the child session checks every 20 seconds and generates status for the main session, which formats the output) | references/api_references.md |
| create_mind_by_markdown | Create mind map | references/api_references.md |
| create_flowchart_by_mermaid | Create flowchart | references/api_references.md |
| space_list | Get knowledge base space list | references/api_references.md |
| create_space | Create a new knowledge base space | references/api_references.md |
| query_space_node | Query space nodes | references/api_references.md |
| create_space_node | Create space node | references/api_references.md |
| delete_space_node | Delete space node | references/api_references.md |
| get_content | Get document content | references/api_references.md |
| upload_image | Upload image and get image_id for use in documents and smart table image fields | references/api_references.md |
| scrape_url | Web clipping: scrape webpage content and automatically save it as a document, returning task_id for progress queries | references/api_references.md |
| scrape_progress | Query web clipping task progress, used with scrape_url | references/api_references.md |
| sheet.* | Online spreadsheet operations (query information, get ranges, batch updates) | sheet/entry.md |
| smartcanvas.* | Document element operations (pages/text/headings/to-do items) | references/smartcanvas_references.md |
| smartsheet.* | Smart table operations (worksheets/views/fields/records) | references/smartsheet_references.md |
| tencent-docengine (independent service) | Word document editing operations (find/insert/replace text, insert paragraphs/images/tables/page breaks/tasks, modify text styles, insert comments, replace images, get end position, get document outline), tool names: find, insert_text, replace_text, find_and_replace, insert_paragraph, update_text_property, insert_task, insert_image, insert_page_break, insert_table, insert_comment, replace_image, get_last_operable_pos, get_outline | references/docengine_references.md |
| manage.* | File management operations (create/delete/move/rename documents, generate copies, search documents, import/export documents, query/set document permissions) | references/manage_references.md |
Call example
Get body content get_content
mcporter call "tencent-docs" "get_content" --args '{"file_id":"bLkQdUHejxNj"}'
Create smart table
mcporter call "tencent-docs" "create_space_node" --args '{"title": "测试智能表t1","node_type": "wiki_tdoc","wiki_tdoc_node": { "title": "测试智能表t1-1","doc_type": "smartsheet"}}'
Query worksheets in a smart table
mcporter call "tencent-docs" "smartsheet.list_tables" --args '{"file_id":"bDAzsLDGgmqw"}'
Add fields in a smart table
mcporter call "tencent-docs" "smartsheet.add_fields" --args '{"file_id":"bEtvncBEcLos","sheet_id": "t00i2h", "fields": [{"field_title":"测试filed1", "field_type": 1}]}'
Create smart document create_smartcanvas_by_mdx
mcporter call "tencent-docs" "create_smartcanvas_by_mdx" --args '{"title": "项目周报", "mdx": "---\ntitle: 项目周报\nicon: 📋\n---\n\n# 本周工作总结\n\n<Callout icon=\"✅\" blockColor=\"light_green\" borderColor=\"green\">\n 本周所有里程碑任务均已按时完成。\n</Callout>\n\n<ColumnList>\n <Column width=\"50%\">\n ## 已完成\n\n <Todo checked>\n 需求评审\n </Todo>\n <Todo checked>\n 接口开发\n </Todo>\n </Column>\n <Column width=\"50%\">\n ## 待完成\n\n <Todo>\n 单元测试\n </Todo>\n <Todo>\n 部署上线\n </Todo>\n </Column>\n</ColumnList>"}'
Create table create_excel_by_markdown
mcporter call "tencent-docs" "create_excel_by_markdown" --args '{"title": "我的日程表", "markdown": "| 日期 | 时间 | 事项 | 地点 | 状态 | 备注 |\n|------|------|------|------|------|------|\n| 2024-03-11 | 09:00-10:00 | 团队会议 | 会议室A | 待办 | 准备项目汇报 |\n| 2024-03-11 | - | 项目文档编写 | 远程 | 进行中 | 完成需求文档 |\n| 2024-03-11 | 14:00-15:30 | 客户沟通 | 线上会议 | 已安排 | 准备演示材料 |\n| 2024-03-12 | 10:00-12:00 | 产品评审 | 会议室B | 待办 | 检查产品原型 |\n| 2024-03-12 | 15:00-16:00 | 培训学习 | 培训室 | 已安排 | AI工具使用 |\n| 2024-03-13 | 全天 | 项目开发 | 办公室 | 进行中 | 功能模块开发 |\n| 2024-03-14 | 09:30-11:00 | 周会总结 | 会议室A | 待办 | 整理本周工作 |\n| 2024-03-15 | 13:00-17:00 | 项目演示 | 客户现场 | 已安排 | 最终演示准备 |"}'
Common workflows
First read referencesall reference files in the directory to understand each tool's functions and parameters
Create general document (recommended method)
📖 Reference documentation: references/mdx_references.md - create_smartcanvas_by_mdx
- Read references/mdx_references.md to understand the MDX component specification
- Generate content containing Frontmatter and MDX components according to the specification
- Self-check one by one against mdx_references to ensure format compliance
- Call create_smartcanvas_by_mdx to create a document
- Get file_id and url from the returned result
Edit an existing document (smart document smartcanvas)
📖 Reference documentation: references/smartcanvas_references.md - Typical workflow example
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
Edit an existing Word document (tencent-docengine standalone service)
📖 Reference documentation: references/docengine_references.md
⚠️ docengine is a standalone MCP service (service name:
tencent-docengine, API address:https://docs.qq.com/api/v6/doc/mcp), tool names have no prefix, call viamcporter call tencent-docengine <工具名>.🔑 Token reuse: tencent-docengine and tencent-docs share the same Token; it is configured automatically after completing tencent-docs authorization (
references/auth.md), no separate authentication is required.
Find and replace text
1. 调用 tencent-docengine 的 find 工具查找目标文本,获取所有匹配位置和上下文
2. 将匹配结果展示给用户,让用户选择要替换的位置
3. 调用 tencent-docengine 的 replace_text 传入对应的 range 进行精确替换
(如需全部替换,可直接调用 find_and_replace)
Insert content into a document
1. 调用 tencent-docengine 的 get_outline 获取文档大纲结构,定位目标标题的可操作位置
或调用 find 定位插入位置(获取目标文本的 index)
2. 按需调用 tencent-docengine 的工具插入内容:
- 插入文本:insert_text
- 插入段落:insert_paragraph(支持标题级别、有序/无序列表)
- 插入图片:insert_image
- 插入表格:insert_table
- 插入分页符:insert_page_break
- 插入任务:insert_task
- 插入批注:insert_comment
- 替换图片:replace_image
- 获取末尾可操作位置:get_last_operable_pos(追加内容到文档末尾时先获取位置)
- 获取文档大纲:get_outline(了解文档结构和各标题、正文的可操作位置)
Modify text styles
1. 调用 tencent-docengine 的 find 查找目标文本,获取 range(begin/end)
2. 调用 tencent-docengine 的 update_text_property 传入 range 和属性(加粗、斜体、颜色等)
Organize documents into a specified directory
📖 Reference documentation: references/api_references.md - query_space_node, create_space_node
- Call
query_space_nodeto find the target folder - Call
create_space_nodeto create a document node at the target location (prefer smartcanvas for doc_type)
Find and read documents
📖 Reference documentation: references/api_references.md - query_space_node, get_content
- Call
query_space_nodeto traverse the node tree to find documents - Get from the results
node_id(i.e.file_id) - Call
get_contentto get document content
Smart sheet operation workflow
📖 Reference documentation: references/smartsheet_references.md - Typical workflow examples
Build a 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)
5. (可选)删除字段(列) → smartsheet.delete_fields
Query and update data
1. 获取工作表 → smartsheet.list_tables
2. 查询记录 → smartsheet.list_records(获取 record_id)
3. 更新记录 → smartsheet.update_records(传入 record_id 和新字段值)
📖 For more smart sheet workflow examples, please refer to:
references/smartsheet_references.md- Typical workflow examples
Create a document in a specified directory
📖 Reference documentation: references/manage_references.md - Typical workflow examples
1. 调用 manage.folder_list 获取文件夹目录
2. 按需调用 manage.* 工具进行文档增删改查、重命名、移动文档:
- 重命名:manage.rename_file_title
- 删除文档:manage.delete_file
- 移动文档:manage.move_file
- 生成副本:manage.copy_file
- 设置权限:manage.set_privilege(仅支持所有人可读和所有人可编辑)
Search documents
1. 搜索文档 → manage.search_file(传入用户指定的关键词)
📖 For more file management workflow examples, please refer to:
references/manage_references.md- Typical workflow examples
Notes
- Manage spaces: use
query_space_listto get the space list, usecreate_spaceto create a new space, usequery_space_nodeto browse the node tree within a space - Use smartcanvas by default: unless the user explicitly specifies another format, otherwisenew documentprefer to use
create_smartcanvas_by_markdown;edit existing documentusesmartcanvas.*series of tools - Creating documents supports
parent_id: allcreate_*_by_markdownandcreate_flowchart_by_mermaidtools support theparent_idparameter, which can create documents directly into a specified directory; if left blank, they are created in the root directory - Word document editing: docengine is a standalone MCP service (service name:
tencent-docengine,API:https://docs.qq.com/api/v6/doc/mcp), shared with tencent-docs the same Token(configured automatically after completing tencent-docs authorization, no separate authentication is required). Tool names have no prefix (such asfind、insert_text、replace_text、insert_comment、replace_image、get_last_operable_pos、get_outline, etc.), only supports the Word document type, and you must ensure you have document write permission before operating. ⚠️ It is recommended to preferfile_url(document link) overfile_idto identify documents, users usually provide document links directly, which is more convenient to use. Before editing, it is recommended to first callget_outlineto get the document outline structure and understand the operable positions of each heading and body text; when the user requests "insert at the beginning of the document", you need to confirm with the user whether it is "before the document title" (usingHEADING_LEVEL_TITLE'stitle_start) or "after the body text/title" (useHEADING_LEVEL_TITLEof thecontent_start) insertion; when unclear, proactively ask; recommended replacement text process: first callfindto find and locate, let the user confirm, then usereplace_textfor precise replacement; if you need to replace all, you can directly usefind_and_replace. When appending content to the end of the document, first callget_last_operable_posto get the end position. Seereferences/docengine_references.md - Use smartcanvas by default: unless the user explicitly specifies another format, otherwiseNew documentprefer to use
create_smartcanvas_by_mdx;Edit an existing documentusesmartcanvas.*series of tools; Edit an existing Word documentusetencent-docenginestandalone service tools - When creating a document,
parent_id: allcreate_*_by_markdown、create_smartcanvas_by_mdxandcreate_flowchart_by_mermaidtools support theparent_idparameter, which can create the document directly in the specified directory; if not filled in, it is created in the root directory - Delete node:
delete_space_nodeby default only deletes the current node (remove_type=current), usingallwill recursively delete all child nodes, so be careful - Markdown content uses UTF-8 format, special characters do not need escaping
- Create slide: use the
create_slidetool, passing indescription(user request) and optionalreference_context(reference material), AI automatically generates content; this interface is anasynchronous interface, after returningsession_idit is recommended to use spawn a child sessiondedicated polling: (1) after the main session submits the task, immediately tell the user "started"; (2) the spawned child session checks once every 20 seconds, each check generates a status for the main session, and automatically cleans up and outputs a timeout status on timeout; (3) the main session receives the child session status and formats the output (in progress/completed/failed/timed out), when the status iscompleted, get from the responsefile_url - Paginated query returns 20-40 records per page, use
has_nextto determine whether there is more node_idis also the document'sfile_idcreate_flowchart_by_mermaid's mermaid content must all use English- Document element operations:
Text、Heading、Task、Imagemust be mounted underPage,parent_idmust be a Page type element ID; before operating, first callsmartcanvas.get_top_level_pagesto get the page structure - Document paginated query:
smartcanvas.get_page_infousescursorpagination,is_over=trueindicates all content has been retrieved - Document deletion note: when deleting a Page element, all its child elements will also be deleted together
- Smart sheet operations: all smartsheet.* tools require
file_idandsheet_id, before operating first callsmartsheet.list_tablesto get sheet_id - Field types cannot be updated:
update_fieldsfield_type cannot be modified, but the original value must be passed in - Record field value format: the value format differs by field type, see
references/smartsheet_references.md- Field value format reference
Troubleshooting guide
Common error codes and solutions
| Error code | Error Type | Solution |
|---|---|---|
| 400006 | Token authentication failed | Local authorization must be completed first; see references/auth.md |
| 400007 | Insufficient VIP privileges | ⭐ Upgrade to VIP now: Visit https://docs.qq.com/vip?immediate_buy=1?part_aid=persnlspace_mcp to purchase VIP service |
| -32601 | Request API error | 🔍 Check the request tool Confirm whether the tool being called exists in the tool list |
| -32603 | Invalid request parameter | 🔍 Check the request parameters: Confirm whether the request parameters are correct, for examplefile_id、content , etc. |
| 11607 | Invalid request parameter | 🔍 Check the request parameters: Confirm whether the request parameters are correct, for examplefile_id、content , etc. |
Troubleshooting steps
- Check the error message: Review the error message to determine the error type, such as authorization, network issues, or business parameter issues
- Check the request parameters: Confirm whether the request parameters are correct, for example
file_id、content, etc. - Read the reference documentation:
references/The reference documentation under the directory contains parameter descriptions for all tools and can help quickly identify the issue - Get the tool list: Use
mcporter list tencent-docsto get the list of all tools, confirm whether the tools are available, and check whether certain parameters are correct