Skip to main content
Glama

complete_task

Mark tasks as completed in Notion, recording completion time and optional summaries to maintain organized workflow tracking.

Instructions

将任务标记为"完成",并在页面 body 中记录完成时间和可选总结。

Args: task_id: 要完成的任务 ID summary: 可选的完成总结/备注,会追加到页面 body

Returns: 更新后的任务详情

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes
summaryNo

Implementation Reference

  • The complete_task handler function which updates the task status to DONE and appends completion details to the task body.
    def complete_task(task_id: str, summary: Optional[str] = None) -> dict:
        """
        将任务标记为"完成",并在页面 body 中记录完成时间和可选总结。
    
        Args:
            task_id: 要完成的任务 ID
            summary: 可选的完成总结/备注,会追加到页面 body
    
        Returns:
            更新后的任务详情
        """
        client = get_client()
        now = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M UTC")
    
        updated = client.update_task(task_id, TaskUpdate(status=TaskStatus.DONE))
    
        log = f"✅ 完成时间:{now}"
        if summary:
            log += f"\n总结:{summary}"
        client.append_task_body(task_id, log)
    
        return updated.model_dump()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wauwaya/notion-workflow-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server