SuperAPI AI Directory

tencent-docs

General & other

View repository

Updated 10-16 08:45

About this skill

SKILL Update

Before using the SKILL each day, perform an update check by following these steps:

  1. Check the current version version: read the version field in the frontmatter at the top of this file; the format is MAJOR.MINOR.PATCH
  2. Check the latest version latest: obtain the latest version information via a commandlatest, with the input parameter version being 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.PATCH
  • release_note: the latest version release notes
  • instruction: the update instruction
  1. Update the version: if the current versionversionis lower than the latest versionlatest, then follow the instruction instruction to update, or prompt the user to update
Tencent Docs MCP Usage Guide

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 Documentsmartcanvas
    • Create a document: use the create_smartcanvas_by_mdx tool (MDX format, supports advanced layout such as columns, highlight blocks, to-do lists, tables, etc.); read the guide file references/mdx_references.md to 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 file references/smartcanvas_references.md
  • Scenario: structured data management-related scenarios; select Smart Sheetsmartsheet
    • Read the guide file references/smartsheet_references.md, which supports operating elements such as fields, records, views, etc. through thesmartsheet.* series of tools
  • Scenario: scenarios related to calculations, filtering, statistics, and Excel operations; select Online Spreadsheetsheet
    • Read the guide file sheet/entry.md, supports operation throughsheet.* series tools to manipulate tables, range data, batch update cells and other elements
  • Scenario: Operations related to generating professional and standardized documents such as papers, assignments, official documents, contracts, notices, and style-enhanced documents; select Word documentdoc
    • Read the entry file doc/entry.md to understand the overall capabilities and workflow, supports execution throughdoc.* series tools for document writing, beautification, and other operations
  • 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 through mcporter call tencent-docengine <工具名> , tool names such as find、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
  • Scenario: PPT file presentations, scenarios requiring page-by-page display and projection presentation; select presentationslide
    • Read the guide file references/api_references.md, supports creating slides through the create_slide tool (AI automatically generates content, asynchronous interface), and needs to work with the slide_progress tool 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 , obtain file_url from the response and inform the user
  • Scenario: Hierarchical knowledge organization (knowledge graph, outline); select mind mapmind
    • Read the guide file references/api_references.md, supports operation throughmind related tools to manipulate mind maps, mind map pages, mind map elements and other elements
  • Scenario: Process/architecture display (flowchart, sequence diagram); select flowchartflowchart
    • Read the guide file references/api_references.md, supports operation throughflowchart related tools to manipulate flowcharts, flowchart pages, flowchart elements and other elements
  • Scenario: Whiteboard presentation scenarios; select whiteboardboard
    • Read the guide file references/api_references.md, supports creating a whiteboard through thecreate_space_node tool
  • Scenario: Data collection and filling, etc.; select collection formform
    • Read the guide file references/api_references.md, supports creating a collection form through thecreate_space_node tool
  • For other general scenarios, select documentsmartcanvas

⚙️ 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

  1. Use mcporter list tencent-docs to get the tool list and parameter Schema
  2. 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-docs returned 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

  1. Read references/mdx_references.md to understand the MDX component specification
  2. Generate content containing Frontmatter and MDX components according to the specification
  3. Self-check one by one against mdx_references to ensure format compliance
  4. Call create_smartcanvas_by_mdx to create a document
  5. 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 via mcporter 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

  1. Call query_space_node to find the target folder
  2. Call create_space_node to 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

  1. Call query_space_node to traverse the node tree to find documents
  2. Get from the results node_id(i.e. file_id)
  3. Call get_content to 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_list to get the space list, use create_space to create a new space, use query_space_node to 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 documentuse smartcanvas.* series of tools
  • Creating documents supports parent_id: all create_*_by_markdown and create_flowchart_by_mermaid tools support the parent_id parameter, 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 as find、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 prefer file_url(document link) over file_id to identify documents, users usually provide document links directly, which is more convenient to use. Before editing, it is recommended to first call get_outline to 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" (using HEADING_LEVEL_TITLE 's title_start) or "after the body text/title" (use HEADING_LEVEL_TITLE of the content_start) insertion; when unclear, proactively ask; recommended replacement text process: first call find to find and locate, let the user confirm, then use replace_text for precise replacement; if you need to replace all, you can directly use find_and_replace. When appending content to the end of the document, first call get_last_operable_pos to get the end position. See references/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 documentuse smartcanvas.* series of tools; Edit an existing Word documentuse tencent-docengine standalone service tools
  • When creating a document, parent_id: all create_*_by_markdown、create_smartcanvas_by_mdx and create_flowchart_by_mermaid tools support the parent_id parameter, 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_node by default only deletes the current node (remove_type=current), using all will 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_slide tool, passing in description(user request) and optional reference_context(reference material), AI automatically generates content; this interface is anasynchronous interface, after returning session_id it 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 is completed , get from the response file_url
  • Paginated query returns 20-40 records per page, use has_next to determine whether there is more
  • node_id is also the document's file_id
  • create_flowchart_by_mermaid 's mermaid content must all use English
  • Document element operations:Text、Heading、Task、Image must be mounted under Page ,parent_id must be a Page type element ID; before operating, first call smartcanvas.get_top_level_pages to get the page structure
  • Document paginated query:smartcanvas.get_page_info uses cursor pagination,is_over=true indicates 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_id and sheet_id, before operating first call smartsheet.list_tables to get sheet_id
  • Field types cannot be updated:update_fields field_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

  1. Check the error message: Review the error message to determine the error type, such as authorization, network issues, or business parameter issues
  2. Check the request parameters: Confirm whether the request parameters are correct, for examplefile_id、content , etc.
  3. Read the reference documentation:references/ The reference documentation under the directory contains parameter descriptions for all tools and can help quickly identify the issue
  4. Get the tool list: Use mcporter list tencent-docs to get the list of all tools, confirm whether the tools are available, and check whether certain parameters are correct