get_tasks_due_today
Retrieve all tasks due today from Dida365 to help users manage deadlines and prioritize daily work effectively.
Instructions
获取今天到期的所有任务。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/dida_mcp/client.py:241-249 (handler)The implementation of `get_tasks_due_today` which filters tasks by checking the 'dueDate' attribute against today's date.
def get_tasks_due_today(self) -> List[Dict]: """获取今天到期的任务""" today = datetime.now(timezone.utc).strftime("%Y-%m-%d") all_tasks = self.get_all_tasks() return [ task for task in all_tasks if task.get("dueDate", "").startswith(today) ] - src/dida_mcp/server.py:241-248 (registration)Registration of the 'get_tasks_due_today' tool in the TOOLS list.
"name": "get_tasks_due_today", "description": "获取今天到期的所有任务。", "inputSchema": { "type": "object", "properties": {}, "required": [], }, }, - src/dida_mcp/server.py:388-396 (handler)Tool dispatch logic for 'get_tasks_due_today' in server.py, which calls the client implementation.
elif name == "get_tasks_due_today": tasks = client.get_tasks_due_today() if not tasks: return "🎉 今天没有到期的任务!" lines = ["📅 今天到期的任务(%d 个):\n" % len(tasks)] for task in tasks: lines.append(format_task(task)) lines.append("") return "\n".join(lines)