delete_task
Remove a specific task from Dida365 projects using its task_id and project_id. This action permanently deletes the task and cannot be undone.
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:215-221 (handler)The actual implementation of the delete_task logic which calls the Dida365 API to delete a task.
def delete_task(self, project_id: str, task_id: str) -> bool: """删除任务""" response = self.client.delete( f"/project/{project_id}/task/{task_id}" ) response.raise_for_status() return True - src/dida_mcp/client.py:215-221 (handler)The core logic that performs the API call to delete a task.
def delete_task(self, project_id: str, task_id: str) -> bool: """删除任务""" response = self.client.delete( f"/project/{project_id}/task/{task_id}" ) response.raise_for_status() return True - src/dida_mcp/server.py:380-385 (handler)The tool handler in the MCP server that parses arguments and calls the client's delete_task method.
elif name == "delete_task": client.delete_task( project_id=args["project_id"], task_id=args["task_id"], ) return "✅ 任务 %s 已删除。" % args["task_id"] - src/dida_mcp/server.py:229-237 (registration)The registration of the 'delete_task' tool with its input schema.
"name": "delete_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:380-385 (handler)The handler block that processes the 'delete_task' tool request and calls the client.
elif name == "delete_task": client.delete_task( project_id=args["project_id"], task_id=args["task_id"], ) return "✅ 任务 %s 已删除。" % args["task_id"] - src/dida_mcp/server.py:229-239 (registration)The registration definition for the delete_task tool in the MCP server.
"name": "delete_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"], }, },