SuperAPI AI Directory

wecom-get-todo-detail

Office & productivity

View repository

Updated 10-16 08:53

About this skill

WeCom todo detail query skill

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

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

Through the wecom_mcp tool, batch query complete details based on a todo ID list, 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, and displaying them directly to the user is meaningless—the user does not recognize these IDs, only names. Therefore, before showing the todo details to the user, you must first call the wecom-contact-lookup skill to obtain the contacts, and match all follower_id and creator_id to real names. Specific method:

Use the wecom_mcp tool to call wecom_mcp call contact get_userlist '{}' to obtain the contacts. In the returned userlist, use the userid field to match follower_id / creator_id, and take the corresponding name.

If a certain ID cannot be found in the contacts, simply mark 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 ✅ Todo ID list, 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"
        }
    ]
}

Return field description

Field Type Description
data_list array Todo detail list, 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-Rejected,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?"

  1. Step 1: Obtain the todo list through wecom-get-todo-list. Use wecom_mcp tool call wecom_mcp call todo get_todo_list '{}'
  2. Step 2: Retrieve details in batches based on the returned todo_id. Use wecom_mcp tool call wecom_mcp call todo get_todo_detail '{"todo_id_list": ["TODO_ID_1", "TODO_ID_2", "TODO_ID_3"]}'
  3. Step 3 (do not skip!): Retrieve 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, users see 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

  1. Personnel IDs must be converted to names

    • The follower_id and creator_id in the returned results are internal system identifiers that users cannot recognize
    • Before displaying the to-do details, first use wecom_mcp tool call wecom_mcp call contact get_userlist '{}' to retrieve the contacts
    • Use the contacts' userid to match follower_id / creator_id, and use name to replace the display
  2. todo_id source rule

    • todo_id must come from the results returned by wecom-get-todo-list ; guessing or constructing it yourself is prohibited
    • Users usually provide a to-do content description rather than an ID; you should first query the list via wecom-get-todo-list and then match
  3. 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
  4. Error handling: if errcode is not 0, inform the user of the error message in errmsg error message in

  5. Single request limit:todo_id_list can pass at most 20 IDs; if exceeded, requests must be made in batches