Skip to main content
Glama

create_task

Create a new task in Notion with customizable details like priority, due date, and tags to organize your workflow.

Instructions

在工作流库中创建一个新任务(状态默认为"待办")。

Args: name: 任务名称(必填) project: 所属项目名称,可选 priority: 优先级,可选:🔴 紧急 | 🟡 高 | 🟢 普通,默认 🟢 普通 due_date: 截止日期,格式 YYYY-MM-DD,可选 tags: 标签列表,如 ["开发", "前端"],可选 note: 备注说明,可选

Returns: 创建成功的任务详情

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
projectNo
priorityNo🟢 普通
due_dateNo
tagsNo
noteNo

Implementation Reference

  • The handler function for the `create_task` tool, which takes task details, validates them using `TaskCreate`, and calls the Notion client to persist the task.
    def create_task(
        name: str,
        project: Optional[str] = None,
        priority: str = "🟢 普通",
        due_date: Optional[str] = None,
        tags: Optional[list[str]] = None,
        note: Optional[str] = None,
    ) -> dict:
        """
        在工作流库中创建一个新任务(状态默认为"待办")。
    
        Args:
            name:     任务名称(必填)
            project:  所属项目名称,可选
            priority: 优先级,可选:🔴 紧急 | 🟡 高 | 🟢 普通,默认 🟢 普通
            due_date: 截止日期,格式 YYYY-MM-DD,可选
            tags:     标签列表,如 ["开发", "前端"],可选
            note:     备注说明,可选
    
        Returns:
            创建成功的任务详情
        """
        data = TaskCreate(
            name=name,
            project=project,
            priority=TaskPriority(priority),
            due_date=due_date,
            tags=tags or [],
            note=note,
        )
        return get_client().create_task(data).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