Skip to main content
Glama

update_settings

Modify Pomodoro timer parameters including work duration, break intervals, and session cycles to customize productivity workflows.

Instructions

Update pomodoro timer settings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workDurationNoWork duration in minutes
shortBreakDurationNoShort break duration in minutes
longBreakDurationNoLong break duration in minutes
pomodorosBeforeLongBreakNoNumber of pomodoros before long break

Implementation Reference

  • The handler logic for the 'update_settings' tool. It conditionally updates the pomodoro settings (workDuration, shortBreakDuration, longBreakDuration, pomodorosBeforeLongBreak) based on the input arguments, saves the data to the JSON file, and returns the updated settings.
    case "update_settings": { if (args.workDuration) data.settings.workDuration = args.workDuration as number; if (args.shortBreakDuration) data.settings.shortBreakDuration = args.shortBreakDuration as number; if (args.longBreakDuration) data.settings.longBreakDuration = args.longBreakDuration as number; if (args.pomodorosBeforeLongBreak) data.settings.pomodorosBeforeLongBreak = args.pomodorosBeforeLongBreak as number; saveData(data); return { content: [ { type: "text", text: JSON.stringify( { success: true, settings: data.settings, message: "Settings updated successfully", }, null, 2 ), }, ], }; }
  • The tool registration and input schema definition for 'update_settings'. Specifies the name, description, and input schema with optional number properties for updating pomodoro timer settings.
    { name: "update_settings", description: "Update pomodoro timer settings", inputSchema: { type: "object", properties: { workDuration: { type: "number", description: "Work duration in minutes" }, shortBreakDuration: { type: "number", description: "Short break duration in minutes", }, longBreakDuration: { type: "number", description: "Long break duration in minutes", }, pomodorosBeforeLongBreak: { type: "number", description: "Number of pomodoros before long break", }, }, }, },
  • src/index.ts:245-247 (registration)
    Registers all tools, including 'update_settings', by setting the handler for ListToolsRequestSchema to return the TOOLS array.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS, }));
  • Helper function called by the handler to persist the updated settings to the data file."},{
    function saveData(data: TodoPomoData): void { fs.writeFileSync(DATA_FILE, JSON.stringify(data, null, 2)); }

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