SuperAPI AI Directory

wecom-edit-todo

General & other

View repository

Updated 10-16 08:47

About this skill

WeCom todo editing skill

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 prerequisite checks to ensure the tool has been added to the allowlist.

Use the wecom_mcp tool to perform write operations on WeCom todos, supporting four operations: create todo, update todo, delete todo, change user status.

Behavior policy

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


Operations

1. Create todo

Create a new todo, with optional content, assignee, and reminder time:

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

Parameter description:

Must follow the format requirements in "Notes":

Parameter Type Required Description
content string ✅ Todo content
follower_list object ❌ Assignee list, format see Notes item 7
remind_time string ❌ Reminder time, format:YYYY-MM-DD HH:mm:ss

Example call:

Use the wecom_mcp tool to call wecom_mcp call todo create_todo '{"content": "<待办的内容>", "remind_time": "2025-06-01 09:00:00"}'

Return format:

{
    "errcode": 0,
    "errmsg": "ok",
    "todo_id": "TODO_ID"
}

2. Update todo

Modify the content, assignees, status, or reminder time of an existing todo:

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

Parameter description:

Must follow the format requirements in "Notes":

Parameter Type Required Description
todo_id string ✅ Todo ID
content string ❌ New todo content
follower_list object ❌ New assignee list (full replacement, not append), format see Notes item 7. To add assignees, first retrieve the existing assignees, merge them, and submit them together
todo_status number ❌ New todo status:0-Completed,1-In progress. To delete, use delete_todo
remind_time string ❌ New reminder time

Example call:

Use the wecom_mcp tool to call wecom_mcp call todo update_todo '{"todo_id": "TODO_ID", "content": "<待办的内容>", "remind_time": "2025-07-01 09:00:00"}'

Return format:

{
    "errcode": 0,
    "errmsg": "ok"
}

3. Delete todo

Delete the specified todo:

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

Parameter description:

Must follow the format requirements in "Notes":

Parameter Type Required Description
todo_id string ✅ Todo ID

Example call:

Use the wecom_mcp tool to call wecom_mcp call todo delete_todo '{"todo_id": "TODO_ID"}'

Return format:

{
    "errcode": 0,
    "errmsg": "ok"
}

Deletion is irreversible; confirm with the user before executing. Note:delete_todo and update_todo set todo_status=2 Same effect, prioritize using delete_todo。


4. Change user to-do status

Change the current user's status in a to-do (rejected/accepted/completed):

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

Parameter description:

Must follow the format requirements in "Notes":

Parameter Type Required Description
todo_id string ✅ To-do ID
user_status number ✅ User status:0-Rejected,1-Accepted,2-Completed

Call example:

Use wecom_mcp tool to call wecom_mcp call todo change_todo_user_status '{"todo_id": "TODO_ID", "user_status": 2}'

Return format:

{
    "errcode": 0,
    "errmsg": "ok"
}

Typical workflow

Create a to-do and assign it to a colleague

User asks: "Help me create a to-do, and have Zhang San finish the requirements document by next Monday"

  1. Step 1: Query Zhang San's userid through the wecom-contact-lookup skill, filter the members whose name is "Zhang San" in the returned results, and obtain their userid
  2. Step 2: Create the to-do and assign it, using wecom_mcp tool to call wecom_mcp call todo create_todo '{"content": "<待办的内容>", "follower_list": {"followers": [{"follower_id": "zhangsan", "follower_status": 1}]}, "remind_time": "2025-03-24 09:00:00"}'

follower_id must come from the wecom-contact-lookup skill's get_userlist returned by the interface userid, guessing on your own is prohibited. If the search results contain multiple people with the same name, display the candidate list for the user to confirm.

Mark a to-do as completed

Two scenarios need to be distinguished:Mark the to-do itself as completed(change todo_status) andMark my participation status as completed(change user_status)。

Scenario A: Mark the to-do itself as completed

User asks: "Mark the to-do 'Complete Q2 planning document' as completed" / "Close this to-do"

  1. Step 1: Get the to-do list through wecom-get-todo-list, and find the todo_id of the target to-do. Use wecom_mcp tool to call wecom_mcp call todo get_todo_list '{}'
  2. Step 2: Get the details through wecom-get-todo-detail, and confirm it is the target to-do. Use wecom_mcp tool to call wecom_mcp call todo get_todo_detail '{"todo_id_list": ["TODO_ID"]}'
  3. Step 3: After confirmation, change the to-do status to completed. Use wecom_mcp tool to call wecom_mcp call todo update_todo '{"todo_id": "TODO_ID", "todo_status": 0}'

Scenario B: Mark my participation status as completed

User asks: "I have completed this to-do" / "Mark my part as completed"

  1. Step 1: Get the to-do list through wecom-get-todo-list, and find the todo_id of the target to-do. Use wecom_mcp tool to call wecom_mcp call todo get_todo_list '{}'
  2. Step 2: Get the details through wecom-get-todo-detail, and confirm it is the target to-do. Use wecom_mcp tool to call wecom_mcp call todo get_todo_detail '{"todo_id_list": ["TODO_ID"]}'
  3. Step 3: After confirmation, change the current user's participation status to completed. Use wecom_mcp tool to call wecom_mcp call todo change_todo_user_status '{"todo_id": "TODO_ID", "user_status": 2}'

How to determine user intent: If the user says "mark as completed" and the to-do was created by themselves and has no other assignees, it usually refers to Scenario A (mark the to-do itself as completed). If the to-do has multiple participants, the user may only want to mark their own part as completed (Scenario B). When uncertain, confirm with the user.

What the user provides is a description of the to-do content rather than an ID, so you need to first search and then match through wecom-get-todo-list and wecom-get-todo-detail. When multiple similar to-dos are matched, list the candidates for the user to confirm.

Update to-do content or reminder time

User asks: "Change the to-do reminder time of that requirements document to next Friday"

  1. Step 1: Find the target to-do. Use wecom_mcp tool to call wecom_mcp call todo get_todo_list '{}', then use wecom_mcp tool to call wecom_mcp call todo get_todo_detail '{"todo_id_list": ["TODO_ID_1", "TODO_ID_2"]}'
  2. Step 2: Update after confirming the target. Use wecom_mcp tool to call wecom_mcp call todo update_todo '{"todo_id": "TODO_ID", "remind_time": "2025-03-28 09:00:00"}'

Delete to-do

User asks: "Delete the to-do 'Code Review'"

  1. Step 1: Find the target to-do. Use wecom_mcp tool to call wecom_mcp call todo get_todo_list '{}', then use wecom_mcp tool to call wecom_mcp call todo get_todo_detail '{"todo_id_list": ["TODO_ID"]}'
  2. Step 2: Delete after confirming with the user. Use wecom_mcp tool to call wecom_mcp call todo delete_todo '{"todo_id": "TODO_ID"}'

Before deleting, you must confirm with the user. Example confirmation wording: "Are you sure you want to delete the to-do 'Code Review'? It cannot be recovered after deletion."


Notes

  1. todo_id source rule

    • todo_id must come from the result returned by wecom-get-todo-list , and it is forbidden to infer or construct it on your own
    • Users usually provide a to-do content description rather than an ID, so you should first query the list via wecom-get-todo-list and then match
    • If multiple similar to-dos are matched, display the candidate list for the user to confirm
  2. follower_id source rule

    • follower_id is the userid, which must be obtained through the useridskill's wecom-contact-lookup interface get_userlist interface of the skill
    • It is forbidden to guess the userid based on the user's name
    • If the search results contain multiple people with the same name, display the candidate list for the user to choose
  3. 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
  4. Meaning of status values

    • To-do status (todo_status):0-Completed,1-In progress,2-Deleted
    • User status (user_status):0-Rejected,1-Accepted,2-Completed
    • Assignee status (follower_status):0-Rejected,1-Accepted,2-Completed
  5. Confirmation of destructive operations

    • Before deleting a to-do (delete_todo), you must confirm with the user
    • Before changing the status to "Rejected" (user_status=0), it is recommended to confirm with the user
  6. Error handling

    • If errcode is not 0, it indicates that the API call failed; inform the user of the error information in errmsg error message in
  7. follower_list format (when used as an input parameter)

    "follower_list": {                    // 分派人列表
        "followers": [                    // 注意里面还有一层是 "followers",它的value才是真正的列表数组
            {
                "follower_id": "FOLLOWER_ID",      // 分派人id
                "follower_status": 1              // 分派人状态:0-拒绝, 1-接受, 2-已完成
            }
        ]
    }
    

    follower_id is the userid, which needs to be obtained by querying wecom-contact-lookup , and it is forbidden to guess or construct it on your own.

Related skills

  • Get to-do list:wecom-get-todo-list — Query the to-do summary list to obtain the todo_id
  • Get to-do details:wecom-get-todo-detail — Get the complete content based on the todo_id
  • Contact lookup:wecom-contact-lookup 's get_userlist — Obtain the member userid, used for follower_id