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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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()
Behavior2/5

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

With no annotations provided, the description carries full burden. It mentions that completion time is recorded and summary is appended to page body, which are useful behavioral details. However, it doesn't disclose important traits: whether this is idempotent (can you complete an already-completed task?), what permissions are needed, whether it triggers notifications, or what happens to subtasks. For a mutation tool with zero annotation coverage, this is insufficient.

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 efficiently structured with a clear main sentence followed by parameter explanations. The Chinese text is direct and front-loaded with the core functionality. The Args/Returns sections are appropriately brief. One minor improvement could be integrating the parameter explanations more seamlessly.

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

Completeness3/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, 0% schema description coverage, but WITH an output schema (which handles return values), the description is moderately complete. It covers what the tool does and parameter meanings, but lacks important behavioral context (idempotency, side effects, error conditions) that would be needed for safe agent use.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. It provides clear meaning for both parameters: 'task_id' identifies which task to complete, and 'summary' is an optional completion note that gets appended to page body. This adds valuable semantic context beyond the bare schema types. However, it doesn't specify format constraints (e.g., task_id format, summary length limits).

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

Purpose4/5

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

The description clearly states the action ('将任务标记为"完成"' - mark task as complete) and the resource ('任务' - task). It specifies that completion time is recorded and optional summary can be appended to page body. However, it doesn't explicitly differentiate from sibling tools like 'update_task' which might also modify task status.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like 'update_task' (which might also handle status changes) or 'start_task'. The description implies this is for finalizing tasks, but doesn't specify prerequisites (e.g., task must exist, be in progress) or when not to use it (e.g., for reopening completed tasks).

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