Skip to main content
Glama

create_task

Add tasks to Dida365 with details like title, project, due date, priority, and tags. Tasks without a project go to the inbox.

Instructions

创建新任务。可以指定标题、所属项目、截止日期、优先级、标签等。不指定项目则放入收集箱。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes任务标题
project_idNo项目ID(可选,不填则放入收集箱)
contentNo任务内容/描述(可选)
start_dateNo开始日期(可选,ISO 8601格式,如 '2026-03-15T09:00:00+0800')
due_dateNo截止日期(可选,ISO 8601格式,如 '2026-03-15T18:00:00+0800')
priorityNo优先级(0=无, 1=低, 3=中, 5=高)
is_all_dayNo是否全天任务(可选)
tagsNo标签列表(可选)

Implementation Reference

  • Implementation of the create_task tool logic in the DidaClient class, which makes the HTTP request to the Dida365 API to create a task.
    def create_task(
        self,
        title: str,
        project_id: Optional[str] = None,
        content: Optional[str] = None,
        desc: Optional[str] = None,
        start_date: Optional[str] = None,
        due_date: Optional[str] = None,
        priority: int = 0,
        is_all_day: Optional[bool] = None,
        time_zone: Optional[str] = None,
        tags: Optional[List[str]] = None,
    ) -> Dict:
        """
        创建新任务
    
        Args:
            title: 任务标题
            project_id: 项目ID(不填则放入收集箱)
            content: 任务内容/描述
            desc: 纯文本描述
            start_date: 开始日期 (ISO 8601, 例如: "2026-03-15T09:00:00+0800")
            due_date: 截止日期 (ISO 8601)
            priority: 优先级 (0=无, 1=低, 3=中, 5=高)
            is_all_day: 是否全天任务
            time_zone: 时区(例如 "Asia/Shanghai")
            tags: 标签列表
        """
        data: Dict[str, Any] = {"title": title}
    
        if project_id:
            data["projectId"] = project_id
        if content:
            data["content"] = content
        if desc:
            data["desc"] = desc
        if start_date:
            data["startDate"] = start_date
        if due_date:
            data["dueDate"] = due_date
        if priority:
            data["priority"] = priority
        if is_all_day is not None:
            data["isAllDay"] = is_all_day
        if time_zone:
            data["timeZone"] = time_zone
        else:
            data["timeZone"] = "Asia/Shanghai"
        if tags:
            data["tags"] = tags
    
        response = self.client.post("/task", json=data)
        response.raise_for_status()
        return response.json()
  • Schema definition for the create_task tool, specifying input arguments and descriptions.
        "name": "create_task",
        "description": "创建新任务。可以指定标题、所属项目、截止日期、优先级、标签等。不指定项目则放入收集箱。",
        "inputSchema": {
            "type": "object",
            "properties": {
                "title": {"type": "string", "description": "任务标题"},
                "project_id": {
                    "type": "string",
                    "description": "项目ID(可选,不填则放入收集箱)",
                },
                "content": {
                    "type": "string",
                    "description": "任务内容/描述(可选)",
                },
                "start_date": {
                    "type": "string",
                    "description": "开始日期(可选,ISO 8601格式,如 '2026-03-15T09:00:00+0800')",
                },
                "due_date": {
                    "type": "string",
                    "description": "截止日期(可选,ISO 8601格式,如 '2026-03-15T18:00:00+0800')",
                },
                "priority": {
                    "type": "integer",
                    "description": "优先级(0=无, 1=低, 3=中, 5=高)",
                    "enum": [0, 1, 3, 5],
                },
                "is_all_day": {
                    "type": "boolean",
                    "description": "是否全天任务(可选)",
                },
                "tags": {
                    "type": "array",
                    "items": {"type": "string"},
                    "description": "标签列表(可选)",
                },
            },
            "required": ["title"],
        },
    },
  • Tool dispatching logic in the server that maps the 'create_task' request to the client method.
    elif name == "create_task":
        task = client.create_task(
            title=args["title"],
            project_id=args.get("project_id"),
            content=args.get("content"),
            start_date=args.get("start_date"),
            due_date=args.get("due_date"),
            priority=args.get("priority", 0),
            is_all_day=args.get("is_all_day"),
            tags=args.get("tags"),
        )
        return "✅ 任务创建成功!\n\n%s" % format_task(task)
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states this is a creation operation ('创建新任务'), implying it's a write/mutation tool. However, it doesn't disclose behavioral traits like authentication requirements, rate limits, whether the operation is idempotent, what happens on duplicate titles, or what the return value looks like (especially problematic since there's no output schema).

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

Conciseness5/5

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

The description is extremely concise—just two short sentences that directly state the purpose and a key behavioral note about the inbox fallback. Every word earns its place with zero redundancy or fluff, and the most important information (creation action and project handling) is front-loaded.

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

Completeness2/5

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

For a mutation tool (task creation) with no annotations and no output schema, the description is incomplete. It doesn't explain what happens after creation—whether it returns the created task ID, success status, or error messages. The behavioral transparency gap is significant given the tool's complexity (8 parameters) and mutation nature, leaving the agent without crucial operational context.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all 8 parameters thoroughly with descriptions, formats (ISO 8601), enums (priority values), and optional/required status. The description adds minimal value beyond the schema—it mentions some parameters (标题, 所属项目, 截止日期, 优先级, 标签) but omits others (content, start_date, is_all_day) and doesn't provide additional semantic context.

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 ('创建新任务') and resource ('任务'), and lists key attributes that can be specified (标题, 所属项目, 截止日期, 优先级, 标签). It distinguishes from siblings by focusing on creation rather than retrieval, update, or deletion. However, it doesn't explicitly differentiate from 'create_project' which creates a different resource type.

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 provides implied usage context by stating '不指定项目则放入收集箱' (if no project is specified, it goes to the inbox), which helps understand when to use project_id. However, it lacks explicit guidance on when to use this tool versus alternatives like 'update_task' for modifications or 'create_project' for project creation, and doesn't mention prerequisites or error conditions.

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/Martinqi826/dida-mcp'

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