productivity_pomodoro
Start a Pomodoro timer session to focus on tasks using 25-minute work intervals with 5-minute breaks, helping manage time effectively.
Instructions
Start a Pomodoro timer session plan (25min work / 5min break)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | Task to focus on | |
| sessions | No | Number of Pomodoro sessions (1-8) |
Implementation Reference
- src/modules/productivity.ts:6-20 (handler)The implementation of the `productivity_pomodoro` tool, which generates a Pomodoro timer session plan based on the provided task and number of sessions.
server.tool("productivity_pomodoro", "Start a Pomodoro timer session plan (25min work / 5min break)", { task: z.string().describe("Task to focus on"), sessions: z.number().default(4).describe("Number of Pomodoro sessions (1-8)") }, async ({ task, sessions }) => { const count = Math.min(Math.max(sessions, 1), 8); const plan = Array.from({ length: count }, (_, i) => { const startMin = i * 30; const endWork = startMin + 25; const endBreak = startMin + 30; return `Session ${i + 1}: ${startMin}min - ${endWork}min WORK | ${endWork}min - ${endBreak}min BREAK`; }); const totalWork = count * 25; const totalBreak = count * 5; return { content: [{ type: "text", text: `**Pomodoro Plan: "${task}"**\n\n${plan.join("\n")}\n\nTotal Work: ${totalWork}min (${(totalWork / 60).toFixed(1)}h)\nTotal Break: ${totalBreak}min\nTotal Time: ${totalWork + totalBreak}min\n\n*Tip: After 4 sessions, take a 15-30min long break.*` }] }; });