Skip to main content
Glama
aYon1997

Health Reminder MCP Server

by aYon1997

get_status

Check current health reminder settings and status to monitor break intervals and notification configurations for maintaining regular movement.

Instructions

获取当前健康提醒的状态和配置

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'get_status' tool within the CallToolRequestSchema handler. It calls getReminderStatus() and returns a JSON-formatted response with the current reminder status.
    case "get_status": {
      const status = getReminderStatus();
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              success: true,
              status: status.active ? "运行中" : "已停止",
              active: status.active,
              config: status.config,
            }, null, 2),
          },
        ],
      };
    }
  • Helper function that provides the current status of the health reminder timer (whether active and current configuration).
    function getReminderStatus() {
      return {
        active: reminderTimer !== null,
        config: currentConfig,
      };
    }
  • Registration of the 'get_status' tool in the tools array, returned by ListToolsRequestSchema handler. Includes name, description, and empty input schema.
    {
      name: "get_status",
      description: "获取当前健康提醒的状态和配置",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Input schema for 'get_status' tool: empty object (no parameters required).
    inputSchema: {
      type: "object",
      properties: {},
    },
  • Client-side wrapper function getStatus() that calls the 'get_status' tool and prints the result in a user-friendly format.
    async function getStatus() {
      console.log("\n正在获取状态信息...");
      const result = await callTool("get_status");
      if (result && result.success) {
        console.log("\n=== 当前状态 ===");
        console.log(`状态: ${result.status}`);
        if (result.active) {
          console.log("\n当前配置:");
          console.log(`  - 间隔时间: ${result.config.interval} 分钟`);
          console.log(`  - 标题: ${result.config.title}`);
          console.log(`  - 消息: ${result.config.message}`);
          console.log(`  - 提示音: ${result.config.sound ? "开启" : "关闭"}`);
        }
      }
    }

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/aYon1997/health-reminder-mcp'

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