dingtalk-ai-table钉钉 AI 表格(多维表)操作技能。使用 mcporter CLI 连接钉钉 MCP server 执行表格创建、数据表管理、字段操作、记录增删改查。需要配置 DINGTALK_MCP_URL 凭证。使用场景:创建 AI 表格、管理数据表结构、批量导入导出数据、自动化库存/项目管理等表格操作任务。
Install via ClawdBot CLI:
clawdbot install aliramw/dingtalk-ai-table通过 MCP 协议连接钉钉 AI 表格 API,执行表格和数据操作。
安装前请阅读:
mcporter (npm/bun 全局安装)scripts/ 目录包含 Python 辅助脚本,建议先审查再运行脚本已实施以下安全保护:
| 保护措施 | 说明 |
|----------|------|
| 路径沙箱 | resolve_safe_path() 防止目录遍历攻击,限制文件访问在 OPENCLAW_WORKSPACE 内 |
| UUID 验证 | 严格验证 dentryUuid 格式,防止无效输入 |
| 文件扩展名白名单 | 仅允许 .json / .csv 文件 |
| 文件大小限制 | JSON 最大 10MB,CSV 最大 50MB,防止 DoS |
| 字段类型白名单 | 仅允许预定义的字段类型 |
| 命令超时 | mcporter 命令超时限制(60-120 秒) |
| 输入清理 | 自动去除空白、验证空值 |
配置建议:
# 设置工作目录限制(推荐)
export OPENCLAW_WORKSPACE=/Users/marila/.openclaw/workspace
本技能依赖 mcporter 工具。安装前请确认来源可信:
npm install -g mcporter# 使用 npm 安装
npm install -g mcporter
# 或使用 bun 安装
bun install -g mcporter
验证安装:
mcporter --version
注意: 全局安装的 CLI 工具具有用户级执行权限,请确保从可信来源安装。
获取 Streamable HTTP URL:
Streamable HTTP URL方式一:使用 mcporter config(推荐)
# 添加钉钉 AI 表格服务器配置(持久化存储)
mcporter config add dingtalk-ai-table --url "<Streamable_HTTP_URL>"
方式二:使用环境变量
# 临时设置(当前终端会话有效)
export DINGTALK_MCP_URL="<Streamable_HTTP_URL>"
将 替换为实际获取的完整 URL。
⚠️ 凭证安全: Streamable HTTP URL 包含访问令牌,等同于密码:
- 不要提交到版本控制系统
- 不要分享给他人
- 推荐使用 mcporter config 持久化存储,避免在命令历史中暴露
所有操作通过 mcporter call dingtalk-ai-table 执行:
# 获取文档根节点
mcporter call dingtalk-ai-table get_root_node_of_my_document --output json
# 创建 AI 表格
mcporter call dingtalk-ai-table create_base_app filename="表格名" target="<rootDentryUuid>" --output json
# 搜索可访问的表格
mcporter call dingtalk-ai-table search_accessible_ai_tables keyword="关键词" --output json
# 1. 获取根节点
ROOT_UUID=$(mcporter call dingtalk-ai-table get_root_node_of_my_document --output json | jq -r '.rootDentryUuid')
# 2. 创建表格
mcporter call dingtalk-ai-table create_base_app filename="我的表格" target="$ROOT_UUID" --output json
# 3. 记录返回的 dentryUuid 用于后续操作
# 创建数据表(可带初始字段)
mcporter call dingtalk-ai-table add_base_table \
--args '{"dentryUuid":"<表格 UUID>","name":"新数据表","fields":[{"name":"字段 1","type":"text"},{"name":"字段 2","type":"number"}]}' \
--output json
# 列出所有数据表
mcporter call dingtalk-ai-table list_base_tables dentry-uuid="<表格 UUID>" --output json
# 重命名数据表
mcporter call dingtalk-ai-table update_base_tables \
--args '{"dentryUuid":"<UUID>","oldSheetIdOrName":"原表名","newName":"新表名"}' \
--output json
# 删除数据表
mcporter call dingtalk-ai-table delete_base_table \
--args '{"dentryUuid":"<UUID>","sheetIdOrName":"表名"}' \
--output json
# 查看字段列表
mcporter call dingtalk-ai-table list_base_field \
--args '{"dentryUuid":"<UUID>","sheetIdOrName":"表名"}' \
--output json
# 添加字段(支持类型:text, number, singleSelect, multipleSelect, date, user, attachment)
mcporter call dingtalk-ai-table add_base_field \
--args '{"dentryUuid":"<UUID>","sheetIdOrName":"表名","addField":{"name":"字段名","type":"text"}}' \
--output json
# 删除字段
mcporter call dingtalk-ai-table delete_base_field \
--args '{"dentryUuid":"<UUID>","sheetIdOrName":"表名","fieldIdOrName":"字段名"}' \
--output json
# 查询记录
mcporter call dingtalk-ai-table search_base_record \
--args '{"dentryUuid":"<UUID>","sheetIdOrName":"表名"}' \
--output json
# 添加记录
mcporter call dingtalk-ai-table add_base_record \
--args '{"dentryUuid":"<UUID>","sheetIdOrName":"表名","records":[{"fields":{"字段 1":"值 1","字段 2":100}}]}' \
--output json
# 更新记录
mcporter call dingtalk-ai-table update_records \
--args '{"dentryUuid":"<UUID>","sheetIdOrName":"表名","records":[{"id":"记录 ID","fields":{"字段":"新值"}}]}' \
--output json
# 删除记录
mcporter call dingtalk-ai-table delete_base_record \
--args '{"dentryUuid":"<UUID>","sheetIdOrName":"表名","recordIds":["记录 ID1","记录 ID2"]}' \
--output json
| 类型 | 说明 | 示例 |
|------|------|------|
| text | 文本 | {"name":"姓名","type":"text"} |
| number | 数字 | {"name":"数量","type":"number"} |
| singleSelect | 单选 | {"name":"状态","type":"singleSelect"} |
| multipleSelect | 多选 | {"name":"标签","type":"multipleSelect"} |
| date | 日期 | {"name":"日期","type":"date"} |
| user | 人员 | {"name":"负责人","type":"user"} |
| attachment | 附件 | {"name":"文件","type":"attachment"} |
对于批量操作,使用 scripts/ 目录中的工具脚本:
# 批量添加字段
python scripts/bulk_add_fields.py <dentryUuid> <sheetName> fields.json
# 批量导入记录(支持 CSV 和 JSON)
python scripts/import_records.py <dentryUuid> <sheetName> data.csv
python scripts/import_records.py <dentryUuid> <sheetName> data.json [batch_size]
🔒 脚本安全特性:
- ✅ 路径沙箱:防止目录遍历攻击(../etc/passwd 等)
- ✅ UUID 格式验证:严格校验输入格式
- ✅ 文件扩展名白名单:仅允许.json/.csv
- ✅ 文件大小限制:JSON 10MB / CSV 50MB
- ✅ 字段类型白名单:防止无效类型注入
- ✅ 命令超时保护:60-120 秒自动终止
>
测试验证: 运行 python3 tests/test_security.py 执行 25 项安全测试
>
⚠️ 注意事项:
- 脚本仅调用 mcporter 命令和处理本地文件,无网络请求
- 首次运行前建议审查脚本源码
- 处理敏感数据时请在受控环境中执行
uuid 字段作为 dentryUuid 参数{"name":"选项","id":"xxx"}YYYY-MM-DD 格式Generated Mar 1, 2026
Retail businesses can use this skill to create and manage inventory tables, track stock levels across multiple locations, and automate reorder processes. The bulk import/export capabilities allow for easy synchronization with existing inventory systems, while field operations enable customized tracking of product attributes.
Project teams can create AI tables to manage tasks, assign responsibilities to team members using user fields, and track progress through singleSelect status fields. The record operations allow for real-time updates as tasks move through different stages, providing a centralized project management dashboard.
Sales teams can build custom CRM tables to track leads, customer interactions, and deal pipelines. The ability to create multiple data tables allows for separate tracking of accounts, contacts, and opportunities, while attachment fields enable document management for contracts and proposals.
Event organizers can create registration tables with fields for attendee information, ticket types, and payment status. The bulk record operations facilitate importing attendee lists from external systems, while date fields help manage event schedules and follow-up activities.
Manufacturing facilities can use AI tables to document quality inspections, track defects, and manage corrective actions. The structured field types ensure consistent data entry, while the security features protect sensitive production data during automated batch processing.
Companies can offer integration services that connect existing business systems to DingTalk AI Tables, creating automated workflows for data synchronization. This involves developing custom scripts that leverage the skill's bulk operations to transfer data between platforms on a scheduled basis.
Consultants can help businesses implement automated table management solutions for specific operational needs like inventory tracking or project management. This includes designing table structures, creating automation scripts, and training teams on using the skill effectively.
Service providers can specialize in migrating data from legacy systems or spreadsheets into structured DingTalk AI Tables. Using the skill's import capabilities and custom scripts, they can transform and validate data during migration while maintaining data integrity.
💬 Integration Tip
Always test table operations in a sandbox environment first, and use the security features like path sandboxing and file size limits when processing external data files to prevent system vulnerabilities.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Provides a 7-step debugging protocol plus language-specific commands to systematically identify, verify, and fix software bugs across multiple environments.
A comprehensive skill for using the Cursor CLI agent for various software engineering tasks (updated for 2026 features, includes tmux automation guide).
Write, run, and manage unit, integration, and E2E tests across TypeScript, Python, and Swift using recommended frameworks.
Control and operate Opencode via slash commands. Use this skill to manage sessions, select models, switch agents (plan/build), and coordinate coding through Opencode.
Coding style memory that adapts to your preferences, conventions, and patterns for consistent coding.