get_all_tasks
Retrieve all incomplete tasks from Dida365 with details like title, due date, priority, and list information to manage your task workflow.
Instructions
获取所有未完成的任务列表,包含任务的标题、截止日期、优先级、所属清单等信息。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/dida_mcp/client.py:225-239 (handler)The core logic for fetching all tasks by iterating through projects and their respective tasks.
def get_all_tasks(self) -> List[Dict]: """获取所有未完成的任务(通过遍历项目)""" projects = self.get_projects() all_tasks: List[Dict] = [] for project in projects: try: project_data = self.get_project_with_tasks(project["id"]) tasks = project_data.get("tasks", []) for task in tasks: task["_projectName"] = project.get("name", "") task["_projectId"] = project["id"] all_tasks.extend(tasks) except httpx.HTTPStatusError: continue return all_tasks - src/dida_mcp/server.py:337-340 (registration)The registration and invocation point of the 'get_all_tasks' tool in the MCP server handler.
elif name == "get_all_tasks": tasks = client.get_all_tasks() if not tasks: return "🎉 没有待办任务,一切都完成了!"