SuperAPI AI Directory

wecom-smartsheet-data

Office & productivity

View repository

Updated 10-16 08:33

About this skill

WeCom smart sheet data management

wecom_mcp is an MCP tool; all operations are completed by calling this tool.

⚠️ Prerequisites: Before the first call to wecom_mcp , you must follow the wecom-preflight skill to perform the prerequisite check and ensure the tool has been added to the whitelist.

Manage records (row data) in a smart sheet. All interfaces support locating documents by either docid or url .

CLI invocation method

Call via the wecom_mcp tool, with category doc:

Use the wecom_mcp tool to call wecom_mcp call doc <tool_name> '<json_params>' to invoke 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, "ok"

when errcode is not 0 , it indicates the interface call failed and can be retried once; if it still fails, display errcode and errmsg to the user.

smartsheet_get_records

Query all records in a sub-sheet.

  • Use the wecom_mcp tool to call wecom_mcp call doc smartsheet_get_records '{"docid": "DOCID", "sheet_id": "SHEETID"}'
  • or via URL: use the wecom_mcp tool to call wecom_mcp call doc smartsheet_get_records '{"url": "https://doc.weixin.qq.com/smartsheet/xxx", "sheet_id": "SHEETID"}'

See API details。

smartsheet_add_records

Add one or more rows of records; it is recommended to stay within 500 rows per call.

Before callingyou must first understand the field types of the target table (via smartsheet_get_fields)。

Use the wecom_mcp tool to call wecom_mcp call doc smartsheet_add_records '{"docid": "DOCID", "sheet_id": "SHEETID", "records": [{"values": {"任务名称": [{"type": "text", "text": "完成需求文档"}], "优先级": [{"text": "高"}]}}]}'

For the value format of each field type, see Cell value format reference。

smartsheet_update_records

Update one or more rows of records; a single call must stay within 500 rows. You need to provide record_id (obtained via smartsheet_get_records ).

Use the wecom_mcp tool to call wecom_mcp call doc smartsheet_update_records '{"docid": "DOCID", "sheet_id": "SHEETID", "records": [{"record_id": "RECORDID", "values": {"任务名称": [{"type": "text", "text": "更新后的内容"}]}}]}'

Note: The created time, last edited time, creator, and last editor fields cannot be updated.

smartsheet_delete_records

Delete one or more rows of records; a single call must stay within 500 rows.The operation is irreversible. record_id is obtained via smartsheet_get_records .

Use the wecom_mcp tool to call wecom_mcp call doc smartsheet_delete_records '{"docid": "DOCID", "sheet_id": "SHEETID", "record_ids": ["RECORDID1", "RECORDID2"]}'

Typical workflows

  1. Read data → Use the wecom_mcp tool to call wecom_mcp call doc smartsheet_get_records '{"docid":"DOCID","sheet_id":"SHEETID"}'
  2. Write data → first smartsheet_get_fields learn the column types → if a member (USER) field is involved, first use wecom-contact-lookup 's get_userlist find the userid of the person → smartsheet_add_records write
  3. Update data → first smartsheet_get_records obtain record_id → if a member (USER) field is involved, first use wecom-contact-lookup 's get_userlist find the userid of the person → smartsheet_update_records update
  4. Delete data → first smartsheet_get_records confirm record_id → smartsheet_delete_records delete

Note: A member (USER) type field requires entering user_idand cannot directly use a name. You must first use the wecom-contact-lookup skill's get_userlist interface to find the corresponding userid by name before using it.