list_tasks
Retrieve tasks from TodoPomo MCP Server with optional status and priority filters to manage productivity workflows.
Instructions
List all tasks with optional filtering
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Filter by status | |
| priority | No | Filter by priority |
Implementation Reference
- src/index.ts:282-304 (handler)Handler for the list_tasks tool: filters tasks by status and priority if provided, otherwise lists all, and returns JSON with tasks and count.case "list_tasks": { let filteredTasks = data.tasks; if (args.status && args.status !== "all") { filteredTasks = filteredTasks.filter((t) => t.status === args.status); } if (args.priority && args.priority !== "all") { filteredTasks = filteredTasks.filter( (t) => t.priority === args.priority ); } return { content: [ { type: "text", text: JSON.stringify( { success: true, tasks: filteredTasks, count: filteredTasks.length }, null, 2 ), }, ], }; }
- src/index.ts:111-129 (registration)Registration of the list_tasks tool in the TOOLS array, including name, description, and input schema.{ name: "list_tasks", description: "List all tasks with optional filtering", inputSchema: { type: "object", properties: { status: { type: "string", enum: ["pending", "in-progress", "completed", "all"], description: "Filter by status", }, priority: { type: "string", enum: ["low", "medium", "high", "all"], description: "Filter by priority", }, }, }, },
- src/index.ts:114-128 (schema)Input schema for list_tasks tool defining optional status and priority filters.inputSchema: { type: "object", properties: { status: { type: "string", enum: ["pending", "in-progress", "completed", "all"], description: "Filter by status", }, priority: { type: "string", enum: ["low", "medium", "high", "all"], description: "Filter by priority", }, }, },