Skip to main content
Glama

update_subtasks

Update subtask lists in Notion by rewriting the subtask block in a task's page body with new names, statuses, and priorities.

Instructions

更新任务的子目标列表(重写页面 body 中的子目标区块)。

Args: task_id: 任务的 Notion 页面 ID subtasks: 完整子目标列表 [{name: str, status: str, priority: str}] status: todo | doing | done priority: 🔴 紧急 | 🟡 高 | 🟢 普通

Returns: 更新后的子目标列表

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes
subtasksYes

Implementation Reference

  • The handler for 'update_subtasks' tool which validates input and calls the Notion client.
    def update_subtasks(task_id: str, subtasks: list[dict]) -> list[dict]:
        """
        更新任务的子目标列表(重写页面 body 中的子目标区块)。
    
        Args:
            task_id:  任务的 Notion 页面 ID
            subtasks: 完整子目标列表 [{name: str, status: str, priority: str}]
                      status: todo | doing | done
                      priority: 🔴 紧急 | 🟡 高 | 🟢 普通
    
        Returns:
            更新后的子目标列表
        """
        parsed = [
            Subtask(
                name=s["name"],
                status=SubtaskStatus(s["status"]),
                priority=TaskPriority(s.get("priority", "🟢 普通")),
            )
            for s in subtasks
        ]
        result = get_client().update_subtasks(task_id, parsed)
        return [s.model_dump() for s in result]

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