SuperAPI AI Directory

wecom-get-todo-list

General & other

View repository

Updated 10-16 08:48

About this skill

WeCom todo list query skill

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

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

Query the WeCom todo list through the wecom_mcp tool, supporting time filtering and pagination.

Behavior strategy

After querying the list, you must query the details: This interface only returns summary information such as todo IDs and status, and does not include the actual todo content or assignee. To users, a todo list without content is useless - what they want to know is "what needs to be done", not a string of IDs. Therefore, every time after calling get_todo_list and getting the result, you must immediately use the returned todo_id list to call wecom-get-todo-detail to get complete details (content, assignee, etc.), and then show them to the user. This is not an optional step, but a necessary part of completing the user's request.

When pagination is not fully retrieved, you must remind the user: The interface is paginated, and it is not required to retrieve all data at once. However, if in the response has_more is true, it means there are still todos not returned afterward - at this time, while displaying the current results, you must clearly tell the user "there are more todos not displayed, do you need to continue viewing?". Users may not know there is more data afterward; if you do not say so, they will think what they see is all, which will cause important todos to be missed. This is an easily overlooked point with serious consequences, so be sure to execute it.

Retry strategy: When encountering "returned HTTP error" or "HTTP request failed", actively retry, up to three retries.


Call method

Use wecom_mcp tool to call wecom_mcp call todo get_todo_list '<json格式的入参>'

Parameter description

Parameter Type Required Description
create_begin_time string ❌ Creation start time, format:YYYY-MM-DD HH:mm:ss
create_end_time string ❌ Creation end time, format:YYYY-MM-DD HH:mm:ss
remind_begin_time string ❌ Reminder start time, format:YYYY-MM-DD HH:mm:ss
remind_end_time string ❌ Reminder end time, format:YYYY-MM-DD HH:mm:ss
limit number ❌ Maximum return count, default 10, maximum 20
cursor string ❌ Pagination cursor, not passed on the first request, passed subsequently from the previous response's next_cursor

Return format

{
    "errcode": 0,
    "errmsg": "ok",
    "index_list": [
        {
            "todo_id": "TODO_ID",
            "todo_status": 1,
            "user_status": 1,
            "creator_id": "CREATOR_ID",
            "remind_time": "2025-06-01 09:00:00",
            "create_time": "2025-01-15 10:30:00",
            "update_time": "2025-01-16 14:20:00"
        }
    ],
    "next_cursor": "NEXT_CURSOR",
    "has_more": false
}

Return field description

Field Type Description
index_list array Todo list
index_list[].todo_id string Todo unique ID
index_list[].todo_status number Todo status:0-Completed,1-In progress,2-Deleted
index_list[].user_status number User status:0-Rejected,1-Accepted,2-Completed
index_list[].creator_id string Creator ID
index_list[].remind_time string Reminder time
index_list[].create_time string Creation time
index_list[].update_time string Update time
next_cursor string Next page cursor
has_more boolean Are there more records?

The list returns todo summary information (excluding content and assignee). After getting the list, you must call wecom-get-todo-detail to get the full details before showing them to the user.


Typical workflow

View todo list (standard two-step process)

User asks: "Show me my recent todos" / "What todos do I have?" / "How many things do I still have to do?"

  1. Step 1: Get the todo list (only IDs and status, no content). Use the wecom_mcp tool to call wecom_mcp call todo get_todo_list '{}'
  2. Step 2 (skipping is forbidden!): Use the returned todo_id list to call wecom-get-todo-detail to get the full details. Use the wecom_mcp tool to call wecom_mcp call todo get_todo_detail '{"todo_id_list": ["返回的TODO_ID_1", "返回的TODO_ID_2"]}'

Both steps are indispensable—only after getting the details can you show meaningful todo content to the user.

  1. Step 3 (conditional execution): Check the has_more field returned in step 1. If it is true, when displaying the results you must remind the user: "The above are some of the todos; more todos are not displayed. Do you want me to continue checking?"—without this reminder, the user will think this is all.

Query by time range

User asks: "What todos were created this month?"

Use the wecom_mcp tool to call wecom_mcp call todo get_todo_list '{"create_begin_time": "2025-03-01 00:00:00", "create_end_time": "2025-03-31 23:59:59"}'

Paginate to retrieve a large number of todos

When the number of todos exceeds the single-page limit, retrieve them in a paginated loop via cursor :

  • First request (no cursor passed): Use the wecom_mcp tool to call wecom_mcp call todo get_todo_list '{"limit": 20}'. If the retrieval is not complete and there are more todos, it will return has_more=true, next_cursor="CURSOR_1"
  • Second request (pass the previous next_cursor): Use the wecom_mcp tool to call wecom_mcp call todo get_todo_list '{"limit": 20, "cursor": "CURSOR_1"}', which returns has_more=false, retrieval complete

Pagination rules:

  • The first request does not pass cursor
  • has_more is true , pass next_cursor as the cursor of the next request
  • has_more is false stop requesting when
  • During pagination, the time filter parameters remain unchanged
  • If you choose not to continue paging (for example, the current page's data is already sufficient), you must tell the user that more todos are not displayed and ask whether the user needs to continue checking

Notes

  1. Time format: All time parameters use the YYYY-MM-DD HH:mm:ss format. When the user says relative times such as "tomorrow" or "next Monday", calculate the specific date based on the current date

  2. Status value meanings

    • Todo status (todo_status):0-completed,1-in progress,2-deleted
    • User status (user_status):0-declined,1-accepted,2-completed
  3. Error handling: If errcode is not 0, inform the user of the error message in errmsg error message in

  4. Details must be fetched: This interface returns summary information (excluding content and assignee). After getting the list, you must immediately call wecom-get-todo-detail to get the full content before showing it to the user; do not show only the list summary

  5. If pagination is not complete, you must remind: If the returned has_more is true, when showing results to the user, you must clearly state "there are more to-dos not displayed" and ask the user whether they want to continue viewing. The user does not know there is more data afterward, and not reminding them will lead to omissions.