delete_task
Remove tasks from your TodoPomo workflow to maintain an organized task list and focus on current priorities.
Instructions
Delete a task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | Yes | Task ID to delete |
Implementation Reference
- src/index.ts:344-370 (handler)Handler for delete_task: finds task by ID in data.tasks, removes it using splice, saves data, returns success or error if not found.case "delete_task": { const taskIndex = data.tasks.findIndex((t) => t.id === args.taskId); if (taskIndex === -1) { return { content: [ { type: "text", text: JSON.stringify({ success: false, error: "Task not found" }), }, ], }; } data.tasks.splice(taskIndex, 1); saveData(data); return { content: [ { type: "text", text: JSON.stringify( { success: true, message: "Task deleted successfully" }, null, 2 ), }, ], }; }
- src/index.ts:153-163 (schema)Tool schema definition including name, description, and inputSchema requiring taskId.{ name: "delete_task", description: "Delete a task", inputSchema: { type: "object", properties: { taskId: { type: "string", description: "Task ID to delete" }, }, required: ["taskId"], }, },
- src/index.ts:245-247 (registration)Registers all tools including delete_task by providing the TOOLS array in response to ListToolsRequest.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS, }));