Skip to main content
Glama

complete_pomodoro

Mark a Pomodoro session as completed to track productivity and manage timed work sessions within task management workflows.

Instructions

Mark a pomodoro session as completed

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession ID to complete

Implementation Reference

  • The handler function for the complete_pomodoro tool. It locates the pomodoro session by ID, marks it as completed, sets the end time, updates the associated task's completed pomodoros count if it's a work session and changes status from pending to in-progress if needed, saves the data, and returns a success response with the updated session.
    case "complete_pomodoro": { const sessionIndex = data.sessions.findIndex( (s) => s.id === args.sessionId ); if (sessionIndex === -1) { return { content: [ { type: "text", text: JSON.stringify({ success: false, error: "Session not found", }), }, ], }; } const session = data.sessions[sessionIndex]; session.completed = true; session.endTime = new Date().toISOString(); // Update task if this was a work session if (session.type === "work" && session.taskId) { const task = data.tasks.find((t) => t.id === session.taskId); if (task) { task.completedPomodoros++; if (task.status === "pending") { task.status = "in-progress"; } } } saveData(data); return { content: [ { type: "text", text: JSON.stringify( { success: true, session, message: "Pomodoro completed!" }, null, 2 ), }, ], }; }
  • src/index.ts:187-197 (registration)
    Registration of the complete_pomodoro tool in the TOOLS array, including its name, description, and input schema requiring a sessionId.
    { name: "complete_pomodoro", description: "Mark a pomodoro session as completed", inputSchema: { type: "object", properties: { sessionId: { type: "string", description: "Session ID to complete" }, }, required: ["sessionId"], }, },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PratyayRajak/todopomo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server