start_task
Move tasks from 'To Do' to 'In Progress' status and record start timestamps in Notion pages to track task initiation.
Instructions
将任务从"待办"推进到"进行中",并在页面 body 中记录开始时间。
Args: task_id: 要开始的任务 ID
Returns: 更新后的任务详情
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes |
Implementation Reference
- tools/workflow.py:155-177 (handler)Implementation of the start_task tool.
def start_task(task_id: str) -> dict: """ 将任务从"待办"推进到"进行中",并在页面 body 中记录开始时间。 Args: task_id: 要开始的任务 ID Returns: 更新后的任务详情 """ client = get_client() now = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M UTC") # Update status updated = client.update_task( task_id, TaskUpdate(status=TaskStatus.IN_PROGRESS), ) # Append timestamp to page body client.append_task_body(task_id, f"▶ 开始时间:{now}") return updated.model_dump() - server.py:40-40 (registration)Registration of the start_task tool in the MCP server.
mcp.tool(start_task)