stop_reminder
Stop the periodic health reminder notifications from the Health Reminder MCP Server to pause break prompts.
Instructions
停止健康提醒定时器
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server/index.ts:138-146 (handler)The core handler function for the 'stop_reminder' tool. It clears the active reminder timer interval if it exists, logs a stop message, and returns true if stopped or false otherwise.function stopReminder() { if (reminderTimer) { clearInterval(reminderTimer); reminderTimer = null; console.log("✓ 健康提醒已停止"); return true; } return false; }
- src/server/index.ts:187-194 (registration)Registers the 'stop_reminder' tool in the list of available tools, specifying its name, description, and input schema (empty object). This is used for the ListTools response.{ name: "stop_reminder", description: "停止健康提醒定时器", inputSchema: { type: "object", properties: {}, }, },
- src/server/index.ts:264-277 (handler)The dispatch handler in the CallToolRequestSchema that invokes the stopReminder function and formats the response.case "stop_reminder": { const stopped = stopReminder(); return { content: [ { type: "text", text: JSON.stringify({ success: stopped, message: stopped ? "健康提醒已停止" : "当前没有运行中的提醒", }, null, 2), }, ], }; }
- src/server/index.ts:190-193 (schema)The input schema definition for the 'stop_reminder' tool, which requires no parameters (empty properties).inputSchema: { type: "object", properties: {}, },
- src/server/index.ts:87-88 (helper)Global state variables used by the stopReminder handler: the timer reference that gets cleared and current config.let reminderTimer: NodeJS.Timeout | null = null; let currentConfig: ReminderConfig = { ...defaultConfig };