wecom_mcpis an MCP tool; all operations are completed by calling this tool.
⚠️ Prerequisites: Before the first call to
wecom_mcp, you must follow thewecom-preflightskill to perform the prerequisite check to ensure the tool has been added to the whitelist.
Manage the sub-sheet and field (column) structure of a smart sheet. All interfaces support locating the document by either docid or url .
How to call
Call via the wecom_mcp tool; the category is doc:
Use the wecom_mcp tool to call wecom_mcp call doc <tool_name> '<json_params>' Call the specified skill
Return format description
All interfaces return a JSON object containing the following common fields:
| Field | Type | Description |
|---|---|---|
errcode |
integer | Return code,0 indicates success, non- 0 indicates failure |
errmsg |
string | Error message, empty on success "ok" |
When errcode is not 0 , it indicates the interface call failed; you may retry once; if it still fails, display errcode and errmsg to the user.
Sub-sheet management
smartsheet_get_sheet
Query all sub-sheet information in the document, returning sheet_id, title, type, etc.
Use the wecom_mcp tool to call wecom_mcp call doc smartsheet_get_sheet '{"docid": "DOCID"}'
smartsheet_add_sheet
Add an empty sub-sheet. The new sub-sheet contains no views, records, or fields and must be supplemented via other interfaces.
Use the wecom_mcp tool to call wecom_mcp call doc smartsheet_add_sheet '{"docid": "DOCID", "properties": {"title": "新子表"}}'
Note: A newly created smart sheet document already contains one sub-sheet by default; call only when multiple sub-sheets are needed.
smartsheet_update_sheet
Modify the sub-sheet title. You must provide sheet_id and the new title.
Use the wecom_mcp tool to call wecom_mcp call doc smartsheet_update_sheet '{"docid": "DOCID", "sheet_id": "SHEETID", "title": "新标题"}'
smartsheet_delete_sheet
Permanently delete the sub-sheet,the operation is irreversible。
Use the wecom_mcp tool to call wecom_mcp call doc smartsheet_delete_sheet '{"docid": "DOCID", "sheet_id": "SHEETID"}'
Field management
smartsheet_get_fields
Query all field information of a sub-sheet, returning field_id, field_title, field_type.
Use the wecom_mcp tool to call wecom_mcp call doc smartsheet_get_fields '{"docid": "DOCID", "sheet_id": "SHEETID"}'
smartsheet_add_fields
Add one or more fields to a sub-sheet. A single sub-sheet supports at most 150 fields.
Use the wecom_mcp tool to call wecom_mcp call doc smartsheet_add_fields '{"docid": "DOCID", "sheet_id": "SHEETID", "fields": [{"field_title": "任务名称", "field_type": "FIELD_TYPE_TEXT"}]}'
For supported field types, see Field type reference。
smartsheet_update_fields
Update the field title.Only the name can be changed, not the type(field_type must be passed as the original type). field_title cannot be updated to the original value.
Use the wecom_mcp tool to call wecom_mcp call doc smartsheet_update_fields '{"docid": "DOCID", "sheet_id": "SHEETID", "fields": [{"field_id": "FIELDID", "field_title": "新标题", "field_type": "FIELD_TYPE_TEXT"}]}'
smartsheet_delete_fields
Delete one or more column fields,the operation is irreversible. field_id can be obtained via smartsheet_get_fields .
Use the wecom_mcp tool to call wecom_mcp call doc smartsheet_delete_fields '{"docid": "DOCID", "sheet_id": "SHEETID", "field_ids": ["FIELDID"]}'
Typical workflow
- Understand the table structure → Use the
wecom_mcptool to callwecom_mcp call doc smartsheet_get_sheet→ Use thewecom_mcptool to callwecom_mcp call doc smartsheet_get_fields - Create the table structure →
smartsheet_add_sheetAdd sub-sheet →smartsheet_add_fieldsdefine columns - Modify table structure →
smartsheet_update_fieldsrename column /smartsheet_delete_fieldsdelete column