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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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]
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses that this is a mutation operation ('更新' meaning 'update') and that it performs a rewrite/replacement of the subtask block. However, it doesn't mention permission requirements, whether changes are reversible, rate limits, or error conditions. The description adds some behavioral context but leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, Args, Returns) and uses bullet points effectively. Every sentence earns its place by providing essential information. It could be slightly more concise by combining some lines, but overall it's efficient and front-loaded with the core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations but with an output schema (implied by the Returns section), the description provides good coverage. It explains the purpose, parameters thoroughly, and return value. The main gap is lack of behavioral warnings or prerequisites that would be important for a write operation, but the parameter documentation is excellent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by providing complete parameter documentation. It clearly explains both parameters: 'task_id' as the Notion page ID, and 'subtasks' as a complete list with detailed structure including field names, types, and enum values for status and priority. This adds substantial meaning beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('更新' meaning 'update'), the resource ('任务的子目标列表' meaning 'task subtask list'), and the mechanism ('重写页面 body 中的子目标区块' meaning 'rewrite the subtask block in the page body'). It distinguishes from sibling tools like 'append_task' or 'update_task' by focusing specifically on subtasks rather than tasks themselves.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when needing to replace the entire subtask list, but doesn't explicitly state when to use this vs alternatives like 'append_task' or 'update_task' (which might handle subtasks differently). It provides some context about '重写' (rewrite) suggesting complete replacement, but lacks explicit guidance on prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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