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 and ensure the tool has been added to the whitelist.
Use the wecom_mcp tool to batch query complete details based on a list of todo IDs, including todo content and assignee information.
Behavior strategy
Convert personnel IDs to names (key step): In the returned results, follower_id and creator_id are both internal system IDs; displaying them directly to the user is meaningless—the user does not recognize these IDs, only names. Therefore, before showing todo details to the user, you must first call the wecom-contact-lookup skill to obtain the contacts list and match all follower_id and creator_id to real names. Specific steps:
Use the wecom_mcp tool to call wecom_mcp call contact get_userlist '{}' to obtain the contacts list; in the returned userlist, use the userid field to match follower_id / creator_id and take the corresponding name.
If an ID cannot be found in the contacts list, simply label it as "Unknown user (ID: xxx)" when displaying.
Retry strategy: When encountering "returned HTTP error" or "HTTP request failed", actively retry, up to three times.
How to call
Use the wecom_mcp tool to call wecom_mcp call todo get_todo_detail '<json格式的入参>'
Parameter description
| Parameter | Type | Required | Description |
|---|---|---|---|
todo_id_list |
array | ✅ | List of todo IDs, up to 20 |
Call example:
Use the wecom_mcp tool to call wecom_mcp call todo get_todo_detail '{"todo_id_list": ["TODO_ID_1", "TODO_ID_2"]}'
Return format
{
"errcode": 0,
"errmsg": "ok",
"data_list": [
{
"todo_id": "TODO_ID",
"todo_status": 1,
"content": "完成Q2规划文档",
"follower_list": {
"followers": [
{
"follower_id": "FOLLOWER_ID",
"follower_status": 1,
"update_time": "2025-01-16 14:20:00"
}
]
},
"creator_id": "CREATOR_ID",
"user_status": 1,
"remind_time": "2025-06-01 09:00:00",
"create_time": "2025-01-15 10:30:00",
"update_time": "2025-01-16 14:20:00"
}
]
}
Returned field description
| Field | Type | Description |
|---|---|---|
data_list |
array | List of todo details, up to 20 items |
data_list[].todo_id |
string | Todo ID |
data_list[].todo_status |
number | Todo status:0-Completed,1-In progress,2-Deleted |
data_list[].content |
string | Todo content |
data_list[].follower_list.followers |
array | Assignee list |
data_list[].follower_list.followers[].follower_id |
string | Assignee ID (i.e., userid) — must be converted to a name via wecom-contact-lookup before display |
data_list[].follower_list.followers[].follower_status |
number | Assignee status:0-Declined,1-Accepted,2-Completed |
data_list[].follower_list.followers[].update_time |
string | Assignee status update time |
data_list[].creator_id |
string | Creator ID — must be converted to a name via wecom-contact-lookup before display |
data_list[].user_status |
number | Current user status |
data_list[].remind_time |
string | Reminder time |
data_list[].create_time |
string | Creation time |
data_list[].update_time |
string | Update time |
Typical workflow
Combined list + detail query (all three steps are indispensable)
User asks: "Show me my recent todos" / "What todo items do I have?"
- Step one: Obtain the todo list via wecom-get-todo-list. Use
wecom_mcptool callwecom_mcp call todo get_todo_list '{}' - Step 2: Based on the returned todo_id, retrieve details in batches. Use
wecom_mcptool callwecom_mcp call todo get_todo_detail '{"todo_id_list": ["TODO_ID_1", "TODO_ID_2", "TODO_ID_3"]}' - Step 3 (do not skip!): Obtain the contacts via wecom-contact-lookup, and convert follower_id / creator_id to names. Use the userid in the returned userlist to match follower_id and creator_id, and take the name field as the display name
Step 3 is the prerequisite for displaying readable results. Without this step, the user sees a string of meaningless IDs instead of names.
Display format (note: the assigner and creator must be displayed as names, not IDs):
📋 您当前的待办事项(共 3 项)
1. 🔵 完成Q2规划文档
- 待办状态:进行中 | 我的状态:已接受
- 提醒时间:2025-06-01 09:00
- 分派人:张三、李四
- 创建时间:2025-01-15
2. 🔵 提交周报
- 待办状态:进行中 | 我的状态:已接受
- 提醒时间:2025-03-17 18:00
- 创建时间:2025-03-10
3. ☑️ 代码评审
- 待办状态:已完成 | 我的状态:已完成
- 创建时间:2025-03-01
Notes
-
Personnel IDs must be converted to names
- In the returned result,
follower_idandcreator_idare internal system identifiers that users cannot recognize - Before displaying the to-do details, first use
wecom_mcptool callwecom_mcp call contact get_userlist '{}'to obtain the contacts - Use the contacts'
useridto matchfollower_id/creator_id, and usenameto replace for display
- In the returned result,
-
todo_id source rules
todo_idmust come from the results returned bywecom-get-todo-list, and it is forbidden to infer or construct it yourself- Users usually provide a to-do content description rather than an ID, so you should first use
wecom-get-todo-listto query the list and then match
-
Status value meanings
- To-do status (
todo_status):0-Completed,1-In progress,2-Deleted - User status (
user_status):0-Rejected,1-Accepted,2-Completed - Assigner status (
follower_status):0-Rejected,1-Accepted,2-Completed
- To-do status (
-
Error handling: If
errcodeis not0, inform the user of the error information inerrmsgerror message in -
Single-request limit:
todo_id_listcan pass at most 20 IDs; if more, requests need to be split into batches