send_immediate_reminder
Send instant health reminder notifications to prompt users to take breaks and move around, with customizable messages, titles, and sound options.
Instructions
立即发送一次健康提醒通知(不影响定时器)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | No | 提醒消息内容 | 该起身活动一下了! |
| title | No | 通知标题 | 健康提醒 |
| sound | No | 是否播放提示音 |
Implementation Reference
- src/server/index.ts:296-317 (handler)The handler logic for the 'send_immediate_reminder' tool. It constructs a config from input arguments (with defaults), calls the sendNotification helper, and returns a success response.case "send_immediate_reminder": { const config = { message: (args?.message as string) || "该起身活动一下了!", title: (args?.title as string) || "健康提醒", sound: args?.sound !== undefined ? (args.sound as boolean) : true, interval: 0, // 不使用 }; sendNotification(config); return { content: [ { type: "text", text: JSON.stringify({ success: true, message: "已发送即时提醒通知", }, null, 2), }, ], }; }
- src/server/index.ts:203-227 (schema)The tool registration object including name, description, and input schema for validation.{ name: "send_immediate_reminder", description: "立即发送一次健康提醒通知(不影响定时器)", inputSchema: { type: "object", properties: { message: { type: "string", description: "提醒消息内容", default: "该起身活动一下了!", }, title: { type: "string", description: "通知标题", default: "健康提醒", }, sound: { type: "boolean", description: "是否播放提示音", default: true, }, }, }, }, ];
- src/server/index.ts:104-114 (helper)Core helper function that sends the desktop notification using node-notifier and logs the event.function sendNotification(config: ReminderConfig) { notifier.notify({ title: config.title, message: config.message, sound: config.sound, wait: false, timeout: 10, }); console.log(`[${new Date().toLocaleString()}] 已发送提醒: ${config.message}`); }
- src/client/index.ts:147-153 (helper)Client-side convenience wrapper to invoke the send_immediate_reminder tool via the MCP client.async function sendImmediateReminder() { console.log("\n正在发送即时提醒..."); const result = await callTool("send_immediate_reminder"); if (result && result.success) { console.log("✓", result.message); } }