Skip to main content
Glama

update_task

Modify existing task details in Dida365, including title, due date, priority, and tags, by providing the task and project IDs.

Instructions

更新已有任务的信息,如标题、截止日期、优先级等。需要提供 task_id 和 project_id。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes任务ID
project_idYes项目ID
titleNo新标题(可选)
contentNo新内容(可选)
due_dateNo新截止日期(可选,ISO 8601格式)
priorityNo新优先级(0=无, 1=低, 3=中, 5=高)
tagsNo新标签列表(可选)

Implementation Reference

  • The `update_task` method in the client class, which performs the actual API request to update a task.
    def update_task(
        self, task_id: str, project_id: str, **kwargs
    ) -> Dict:
        """
        更新任务
    
        Args:
            task_id: 任务ID
            project_id: 项目ID
            **kwargs: 要更新的字段
        """
        data: Dict[str, Any] = {"id": task_id, "projectId": project_id}
        field_map = {
            "title": "title",
            "content": "content",
            "desc": "desc",
            "start_date": "startDate",
            "due_date": "dueDate",
            "priority": "priority",
            "is_all_day": "isAllDay",
            "time_zone": "timeZone",
            "tags": "tags",
        }
        for key, api_key in field_map.items():
            if key in kwargs and kwargs[key] is not None:
                data[api_key] = kwargs[key]
    
        response = self.client.post(f"/task/{task_id}", json=data)
        response.raise_for_status()
        return response.json()
  • The dispatcher logic in `server.py` that receives the tool call and invokes the client's `update_task` method.
    elif name == "update_task":
        update_fields = {
            k: v
            for k, v in args.items()
            if k not in ("task_id", "project_id") and v is not None
        }
        task = client.update_task(
            task_id=args["task_id"],
            project_id=args["project_id"],
            **update_fields,
        )
        return "✅ 任务已更新!\n\n%s" % format_task(task)
  • MCP tool schema definition for `update_task`.
    {
        "name": "update_task",
        "description": "更新已有任务的信息,如标题、截止日期、优先级等。需要提供 task_id 和 project_id。",
        "inputSchema": {
            "type": "object",
            "properties": {
                "task_id": {"type": "string", "description": "任务ID"},
                "project_id": {"type": "string", "description": "项目ID"},
                "title": {"type": "string", "description": "新标题(可选)"},
                "content": {"type": "string", "description": "新内容(可选)"},
                "due_date": {
                    "type": "string",
                    "description": "新截止日期(可选,ISO 8601格式)",
                },
                "priority": {
                    "type": "integer",
                    "description": "新优先级(0=无, 1=低, 3=中, 5=高)",
                    "enum": [0, 1, 3, 5],
                },
                "tags": {
                    "type": "array",
                    "items": {"type": "string"},
                    "description": "新标签列表(可选)",
                },
            },
            "required": ["task_id", "project_id"],
        },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While it indicates this is an update operation, it doesn't describe permissions needed, whether changes are reversible, rate limits, error conditions, or what happens to unspecified fields. 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 appropriately concise with two sentences that efficiently convey the core functionality and required parameters. No wasted words, though it could be slightly more structured by explicitly separating purpose from requirements.

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 with 7 parameters and no annotations or output schema, the description is incomplete. It doesn't address behavioral aspects like permissions, side effects, or response format. While the schema covers parameters well, the overall context for safe and effective use is lacking.

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 7 parameters thoroughly. The description mentions '标题、截止日期、优先级等' (title, due date, priority, etc.) which aligns with some parameters but adds no additional semantic context beyond what's in the schema. The baseline of 3 is appropriate when schema does the heavy lifting.

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 tool's purpose: '更新已有任务的信息' (update existing task information) with examples of fields that can be updated. It specifies the verb (update) and resource (task), but doesn't explicitly differentiate from sibling tools like 'complete_task' or 'delete_task' which also modify tasks.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose update_task over complete_task, delete_task, or create_task, nor does it specify prerequisites or appropriate contexts for use.

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