complete_task
Mark tasks as completed in Dida365 by providing task and project IDs. This tool helps users track progress and manage task completion within projects.
Instructions
将指定任务标记为已完成。需要提供 task_id 和 project_id。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | 任务ID | |
| project_id | Yes | 项目ID |
Implementation Reference
- src/dida_mcp/client.py:207-213 (handler)The actual HTTP API implementation for completing a task in Dida365.
def complete_task(self, project_id: str, task_id: str) -> bool: """将任务标记为完成""" response = self.client.post( f"/project/{project_id}/task/{task_id}/complete" ) response.raise_for_status() return True - src/dida_mcp/server.py:217-227 (registration)The MCP tool definition for `complete_task`, including its input schema.
"name": "complete_task", "description": "将指定任务标记为已完成。需要提供 task_id 和 project_id。", "inputSchema": { "type": "object", "properties": { "task_id": {"type": "string", "description": "任务ID"}, "project_id": {"type": "string", "description": "项目ID"}, }, "required": ["task_id", "project_id"], }, }, - src/dida_mcp/server.py:373-378 (handler)The tool dispatcher logic that handles the `complete_task` request by calling the client's `complete_task` method.
elif name == "complete_task": client.complete_task( project_id=args["project_id"], task_id=args["task_id"], ) return "✅ 任务 %s 已标记为完成!" % args["task_id"]