Skip to main content
Glama
sheacoding

MCP Reminder

by sheacoding

get_pending_alarms

Retrieve all expired alarms that require immediate notification. This tool checks for pending reminders that need user attention.

Instructions

获取所有到期的闹钟

小智会定期调用此接口检查是否有需要提醒的闹钟

Returns: 包含到期闹钟列表的字典

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual logic to retrieve pending alarms from storage.
    def get_pending_alarms(self) -> List[Alarm]:
        """获取所有到期且未关闭的闹钟"""
        alarms = self.load_alarms()
        return [alarm for alarm in alarms if alarm.is_due()]
  • MCP tool registration and handler wrapper for get_pending_alarms.
    @mcp.tool()
    def get_pending_alarms() -> dict:
        """
        获取所有到期的闹钟
    
        小智会定期调用此接口检查是否有需要提醒的闹钟
    
        Returns:
            包含到期闹钟列表的字典
        """
        pending_alarms = storage.get_pending_alarms()
    
        logger.info(f"查询到期闹钟,找到 {len(pending_alarms)} 个")
    
        if not pending_alarms:
            return {
                "success": True,
                "count": 0,
                "alarms": [],
                "message": "当前没有到期的闹钟"
            }
    
        alarms_data = [
            {
                "id": alarm.id,
                "time": alarm.time,
                "description": alarm.description
            }
            for alarm in pending_alarms
        ]
    
        return {
            "success": True,
            "count": len(pending_alarms),
            "alarms": alarms_data,
            "message": f"有 {len(pending_alarms)} 个闹钟到期"
        }
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 mentions the tool is called periodically and returns a dictionary of expired alarms, but lacks critical details: whether this is read-only or has side effects, permission requirements, rate limits, error handling, or what '到期' (expired) precisely means. The description adds minimal behavioral context beyond the basic purpose.

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

Conciseness4/5

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

The description is concise with three sentences: purpose, usage context, and return value. Each sentence adds value without redundancy. However, the structure could be more front-loaded by merging the first two sentences for better clarity.

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 no annotations and no output schema, the description is incomplete. It mentions returning a '字典' (dictionary) but doesn't describe the structure, keys, or data types of the alarm list. For a tool with siblings and potential complexity in alarm management, more detail on behavior, output format, and differentiation from other tools is needed.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100% (though empty). The description doesn't need to explain parameters, so it meets baseline expectations. No additional parameter information is required or provided.

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 tool's purpose: '获取所有到期的闹钟' (Get all expired alarms). It specifies the verb ('获取' - get) and resource ('到期的闹钟' - expired alarms). However, it doesn't explicitly distinguish this from sibling tools like 'check_all_reminders' or 'get_pending_todos', which reduces clarity about its unique role.

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

Usage Guidelines3/5

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

The description provides some usage context: '小智会定期调用此接口检查是否有需要提醒的闹钟' (Xiaozhi will periodically call this interface to check if there are alarms that need reminding). This implies it's for periodic checking, but it doesn't specify when to use this versus alternatives like 'check_all_reminders' or 'dismiss_alarm', nor does it mention prerequisites or exclusions.

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

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