get_tasks_by_priority
Retrieve tasks from Dida365 based on their priority level (none, low, medium, or high) to focus on important items and organize workflow efficiently.
Instructions
按优先级获取任务。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| priority | Yes | 优先级(0=无, 1=低, 3=中, 5=高) |
Implementation Reference
- src/dida_mcp/client.py:267-270 (handler)The actual implementation of the get_tasks_by_priority tool logic in the client class.
def get_tasks_by_priority(self, priority: int) -> List[Dict]: """按优先级获取任务 (0=无, 1=低, 3=中, 5=高)""" all_tasks = self.get_all_tasks() return [task for task in all_tasks if task.get("priority", 0) == priority] - src/dida_mcp/server.py:258-272 (registration)The registration of the get_tasks_by_priority tool definition in the MCP server.
{ "name": "get_tasks_by_priority", "description": "按优先级获取任务。", "inputSchema": { "type": "object", "properties": { "priority": { "type": "integer", "description": "优先级(0=无, 1=低, 3=中, 5=高)", "enum": [0, 1, 3, 5], } }, "required": ["priority"], }, },