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"],
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('Mark as completed') but doesn't explain what 'completed' means (e.g., does it record time, update stats, trigger notifications?), whether it requires specific conditions, or what happens if invoked incorrectly. This leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized for a simple tool and front-loads the core action without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (a mutation tool with no annotations and no output schema), the description is incomplete. It doesn't explain the outcome (e.g., what gets updated), potential side effects, or error conditions, leaving the agent with insufficient context for reliable use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the 'sessionId' parameter fully. The description adds no additional meaning about the parameter beyond what's in the schema, such as where to get the sessionId or format expectations. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Mark as completed') and the resource ('pomodoro session'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_active_session' or 'start_pomodoro' beyond the basic verb distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an active session), exclusions, or relationships with sibling tools like 'start_pomodoro' or 'get_active_session'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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